add overrides for generateDefaultLayoutParams().

Without overriding this method in PercentRelativeLayout and
PercentFrameLayout, subsequent interactions with the params will be
FrameLayout rather than PercentFrameLayout. This parameterless prototype
of the function is used by addView.

Change-Id: I8f12e9de2b084236d879e18f3bf7f2ddcdb9c801
diff --git a/percent/Android.mk b/percent/Android.mk
index 5d4cf86..bc268c3 100644
--- a/percent/Android.mk
+++ b/percent/Android.mk
@@ -32,7 +32,7 @@
 # in their makefiles to include the resources in their package.
 include $(CLEAR_VARS)
 LOCAL_MODULE := android-support-percent
-LOCAL_SDK_VERSION := 7
+LOCAL_SDK_VERSION := 8
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
 LOCAL_JAVA_LIBRARIES := android-support-percent-res \
     android-support-v4
diff --git a/percent/AndroidManifest.xml b/percent/AndroidManifest.xml
index 12a6568..8668424 100644
--- a/percent/AndroidManifest.xml
+++ b/percent/AndroidManifest.xml
@@ -15,6 +15,6 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
           package="android.support.percent">
-    <uses-sdk android:minSdkVersion="7"/>
+    <uses-sdk android:minSdkVersion="8"/>
     <application />
 </manifest>
diff --git a/percent/src/android/support/percent/PercentFrameLayout.java b/percent/src/android/support/percent/PercentFrameLayout.java
index 90c238d..8ce31af 100644
--- a/percent/src/android/support/percent/PercentFrameLayout.java
+++ b/percent/src/android/support/percent/PercentFrameLayout.java
@@ -78,6 +78,11 @@
     }
 
     @Override
+    protected LayoutParams generateDefaultLayoutParams() {
+        return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+    }
+
+    @Override
     public LayoutParams generateLayoutParams(AttributeSet attrs) {
         return new LayoutParams(getContext(), attrs);
     }
diff --git a/percent/src/android/support/percent/PercentRelativeLayout.java b/percent/src/android/support/percent/PercentRelativeLayout.java
index 07c08cf..0af8429 100644
--- a/percent/src/android/support/percent/PercentRelativeLayout.java
+++ b/percent/src/android/support/percent/PercentRelativeLayout.java
@@ -78,6 +78,11 @@
     }
 
     @Override
+    protected LayoutParams generateDefaultLayoutParams() {
+        return new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
+    }
+
+    @Override
     public LayoutParams generateLayoutParams(AttributeSet attrs) {
         return new LayoutParams(getContext(), attrs);
     }