summaryrefslogtreecommitdiff
path: root/core/java/android/widget/TableLayout.java
diff options
context:
space:
mode:
authorJustin Ho <justinho@google.com>2012-10-17 15:50:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-17 15:50:48 -0700
commitf49d835dfe1bd21920ff8a48cbdfb9c1fd632fd9 (patch)
tree732179c3ca4004019fca094e81bd42a234f1cafb /core/java/android/widget/TableLayout.java
parent57fca90ac65ecfe97acd4c93d442c3db8f815e11 (diff)
This restores JB MR0 behavior where the framework throws an exception for improper layouts that are missing layout_width and/or layout_height.
This reverts commit 57fca90ac65ecfe97acd4c93d442c3db8f815e11 Change-Id: I0fe25056cd54b8852b32ae4621e048d3f5c7d555
Diffstat (limited to 'core/java/android/widget/TableLayout.java')
-rw-r--r--core/java/android/widget/TableLayout.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/widget/TableLayout.java b/core/java/android/widget/TableLayout.java
index 113299a73cee..399b4fa14544 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;
+ }
}
}