diff options
| author | Philip Milne <pmilne@google.com> | 2012-05-31 10:30:09 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-31 10:30:09 -0700 |
| commit | 0597161ee43cfaa7dbe14691a134fb358a00317a (patch) | |
| tree | 07a18597f6057118321835913d01b4f2361c0a29 /core/java/android/view/ViewGroup.java | |
| parent | b84814b27956930411356a1bae13744f6c327e69 (diff) | |
| parent | c29f031598811486d83f418fd08fbfe1fc41788a (diff) | |
Merge "Fix for bug 6050753."
Diffstat (limited to 'core/java/android/view/ViewGroup.java')
| -rw-r--r-- | core/java/android/view/ViewGroup.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java index 1aec7c8d1417..e97ebe4affd5 100644 --- a/core/java/android/view/ViewGroup.java +++ b/core/java/android/view/ViewGroup.java @@ -5436,15 +5436,19 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager } /** - * Extracts the layout parameters from the supplied attributes. + * Extracts the <code>width</code> and <code>height</code> layout parameters + * from the supplied TypedArray, <code>a</code>, and assigns them + * to the appropriate fields. If, <code>a</code>, does not contain an + * entry for either attribute, the value, {@link ViewGroup.LayoutParams#WRAP_CONTENT}, + * is used as a default. * * @param a the style attributes to extract the parameters from * @param widthAttr the identifier of the width attribute * @param heightAttr the identifier of the height attribute */ protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) { - width = a.getLayoutDimension(widthAttr, "layout_width"); - height = a.getLayoutDimension(heightAttr, "layout_height"); + width = a.getLayoutDimension(widthAttr, WRAP_CONTENT); + height = a.getLayoutDimension(heightAttr, WRAP_CONTENT); } /** |
