summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget/TableRow.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/widget/TableRow.java')
-rw-r--r--core/java/android/widget/TableRow.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/java/android/widget/TableRow.java b/core/java/android/widget/TableRow.java
index 3f8f9dae..68ffd73 100644
--- a/core/java/android/widget/TableRow.java
+++ b/core/java/android/widget/TableRow.java
@@ -505,8 +505,19 @@ public class TableRow extends LinearLayout {
@Override
protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) {
- width = a.getLayoutDimension(widthAttr, MATCH_PARENT);
- height = a.getLayoutDimension(heightAttr, WRAP_CONTENT);
+ // 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;
+ }
}
}