diff options
author | Mathias Agopian <mathias@google.com> | 2012-10-15 20:53:21 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-15 20:53:21 -0700 |
commit | d8c4f50981a887b8332ad3abdb51c4cb4151dcb8 (patch) | |
tree | d9012e18366eab38f374ddfda1e561e6e7b8d8ed /core/java/android/widget | |
parent | 0d4f45d9421ac5c80edeef8e838c2b874e548157 (diff) | |
parent | 1167b7b9e43878f077478f58e31e268c2e191110 (diff) | |
download | frameworks_base-d8c4f50981a887b8332ad3abdb51c4cb4151dcb8.zip frameworks_base-d8c4f50981a887b8332ad3abdb51c4cb4151dcb8.tar.gz frameworks_base-d8c4f50981a887b8332ad3abdb51c4cb4151dcb8.tar.bz2 |
am 1167b7b9: am dcfe6cee: am 6868d6f3: Revert "Revert "Fix for bug 6050753.""
* commit '1167b7b9e43878f077478f58e31e268c2e191110':
Revert "Revert "Fix for bug 6050753.""
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/FrameLayout.java | 6 | ||||
-rw-r--r-- | core/java/android/widget/RadioGroup.java | 27 | ||||
-rw-r--r-- | core/java/android/widget/TableLayout.java | 9 | ||||
-rw-r--r-- | core/java/android/widget/TableRow.java | 15 |
4 files changed, 10 insertions, 47 deletions
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java index e158776..45f30df 100644 --- a/core/java/android/widget/FrameLayout.java +++ b/core/java/android/widget/FrameLayout.java @@ -608,6 +608,12 @@ public class FrameLayout extends ViewGroup { */ public int gravity = -1; + @Override + protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) { + width = a.getLayoutDimension(widthAttr, MATCH_PARENT); + height = a.getLayoutDimension(heightAttr, MATCH_PARENT); + } + /** * {@inheritDoc} */ diff --git a/core/java/android/widget/RadioGroup.java b/core/java/android/widget/RadioGroup.java index 78d05b0..42d63b2 100644 --- a/core/java/android/widget/RadioGroup.java +++ b/core/java/android/widget/RadioGroup.java @@ -297,33 +297,6 @@ public class RadioGroup extends LinearLayout { public LayoutParams(MarginLayoutParams source) { super(source); } - - /** - * <p>Fixes the child's width to - * {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} and the child's - * height to {@link android.view.ViewGroup.LayoutParams#WRAP_CONTENT} - * when not specified in the XML file.</p> - * - * @param a the styled attributes set - * @param widthAttr the width attribute to fetch - * @param heightAttr the height attribute to fetch - */ - @Override - protected void setBaseAttributes(TypedArray a, - int widthAttr, int heightAttr) { - - if (a.hasValue(widthAttr)) { - width = a.getLayoutDimension(widthAttr, "layout_width"); - } else { - width = WRAP_CONTENT; - } - - if (a.hasValue(heightAttr)) { - height = a.getLayoutDimension(heightAttr, "layout_height"); - } else { - height = WRAP_CONTENT; - } - } } /** diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java index f4b2ce0..b65b421 100644 --- a/core/java/android/widget/TableLayout.java +++ b/core/java/android/widget/TableLayout.java @@ -741,14 +741,9 @@ public class TableLayout extends LinearLayout { * @param heightAttr the height attribute to fetch */ @Override - protected void setBaseAttributes(TypedArray a, - int widthAttr, int heightAttr) { + protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) { this.width = MATCH_PARENT; - if (a.hasValue(heightAttr)) { - this.height = a.getLayoutDimension(heightAttr, "layout_height"); - } else { - this.height = WRAP_CONTENT; - } + this.height = a.getLayoutDimension(heightAttr, WRAP_CONTENT); } } diff --git a/core/java/android/widget/TableRow.java b/core/java/android/widget/TableRow.java index a8cc406..a647d10 100644 --- a/core/java/android/widget/TableRow.java +++ b/core/java/android/widget/TableRow.java @@ -505,19 +505,8 @@ public class TableRow extends LinearLayout { @Override protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) { - // We don't want to force users to specify a layout_width - if (a.hasValue(widthAttr)) { - width = a.getLayoutDimension(widthAttr, "layout_width"); - } else { - width = MATCH_PARENT; - } - - // We don't want to force users to specify a layout_height - if (a.hasValue(heightAttr)) { - height = a.getLayoutDimension(heightAttr, "layout_height"); - } else { - height = WRAP_CONTENT; - } + width = a.getLayoutDimension(widthAttr, MATCH_PARENT); + height = a.getLayoutDimension(heightAttr, WRAP_CONTENT); } } |