diff options
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 113299a..399b4fa 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; + } } } |