diff options
| author | Dave Burke <daveburke@google.com> | 2012-10-18 21:09:48 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-18 21:09:48 -0700 |
| commit | 0b9b415632f559d893ac9ee5e43385d6ffb65b99 (patch) | |
| tree | 279adb0cc9f17418124e7b9ee83cf151485adcdf /core/java/android/widget/TableLayout.java | |
| parent | 774ac65ae297c207f81496a1f4aadcfff71661b3 (diff) | |
| parent | b1f434c16eefb028ef441ba40df8abe1e087a4eb (diff) | |
am b1f434c1: am 744b4dca: am 09a5321c: Merge "Revert "Revert "This restores JB MR0 behavior where the framework throws an exception for improper layouts that are missing layout_width and/or layout_height.""" into jb-mr1-dev
* commit 'b1f434c16eefb028ef441ba40df8abe1e087a4eb':
Revert "Revert "This restores JB MR0 behavior where the framework throws an exception for improper layouts that are missing layout_width and/or layout_height.""
Diffstat (limited to 'core/java/android/widget/TableLayout.java')
| -rw-r--r-- | core/java/android/widget/TableLayout.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java index b65b421894bf..f4b2ce0c89df 100644 --- a/core/java/android/widget/TableLayout.java +++ b/core/java/android/widget/TableLayout.java @@ -741,9 +741,14 @@ 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; - this.height = a.getLayoutDimension(heightAttr, WRAP_CONTENT); + if (a.hasValue(heightAttr)) { + this.height = a.getLayoutDimension(heightAttr, "layout_height"); + } else { + this.height = WRAP_CONTENT; + } } } |
