summaryrefslogtreecommitdiff
path: root/core/java/android/widget/GridLayout.java
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2014-05-24 21:02:45 -0700
committerPhilip Milne <pmilne@google.com>2014-05-24 21:02:45 -0700
commitdea890fa64bca15637e824306aa301775e933eee (patch)
treea0c8c6db21ce8eaa03592b9cfa1d4a9c883f3a45 /core/java/android/widget/GridLayout.java
parent4885f2f773915a48d0e2f67bc604b081327372a0 (diff)
More on weights in GridLayout
Chance as little as possible from existing. If weights are defined only a subset of the views in a layout (the normal case) leave the layout of the remaining views unaffected. Change-Id: I27473e303c0666930e2fb515b794df96a8b97272
Diffstat (limited to 'core/java/android/widget/GridLayout.java')
-rw-r--r--core/java/android/widget/GridLayout.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/widget/GridLayout.java b/core/java/android/widget/GridLayout.java
index df27f86a5096..defc26ccabec 100644
--- a/core/java/android/widget/GridLayout.java
+++ b/core/java/android/widget/GridLayout.java
@@ -1322,7 +1322,7 @@ public class GridLayout extends ViewGroup {
// we must include views that are GONE here, see introductory javadoc
LayoutParams lp = getLayoutParams(c);
Spec spec = horizontal ? lp.columnSpec : lp.rowSpec;
- int size = !hasWeights() ?
+ int size = (spec.weight == 0) ?
getMeasurementIncludingMargin(c, horizontal) :
getOriginalMeasurements()[i] + getDeltas()[i];
groupBounds.getValue(i).include(GridLayout.this, c, spec, this, size);