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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user