Merge \"Exclude children from excess space distribution when using largest child\" into nyc-dev
am: 7705d5fd6e
Change-Id: I9a478a5dd666c8c938206e888065dbec976a9e82
This commit is contained in:
@@ -890,7 +890,9 @@ public class LinearLayout extends ViewGroup {
|
|||||||
remainingWeightSum -= childWeight;
|
remainingWeightSum -= childWeight;
|
||||||
|
|
||||||
final int childHeight;
|
final int childHeight;
|
||||||
if (lp.height == 0 && (!mAllowInconsistentMeasurement
|
if (mUseLargestChild && heightMode != MeasureSpec.EXACTLY) {
|
||||||
|
childHeight = largestChildHeight;
|
||||||
|
} else if (lp.height == 0 && (!mAllowInconsistentMeasurement
|
||||||
|| heightMode == MeasureSpec.EXACTLY)) {
|
|| heightMode == MeasureSpec.EXACTLY)) {
|
||||||
// This child needs to be laid out from scratch using
|
// This child needs to be laid out from scratch using
|
||||||
// only its share of excess space.
|
// only its share of excess space.
|
||||||
@@ -1272,7 +1274,9 @@ public class LinearLayout extends ViewGroup {
|
|||||||
remainingWeightSum -= childWeight;
|
remainingWeightSum -= childWeight;
|
||||||
|
|
||||||
final int childWidth;
|
final int childWidth;
|
||||||
if (lp.width == 0 && (!mAllowInconsistentMeasurement
|
if (mUseLargestChild && widthMode != MeasureSpec.EXACTLY) {
|
||||||
|
childWidth = largestChildWidth;
|
||||||
|
} else if (lp.width == 0 && (!mAllowInconsistentMeasurement
|
||||||
|| widthMode == MeasureSpec.EXACTLY)) {
|
|| widthMode == MeasureSpec.EXACTLY)) {
|
||||||
// This child needs to be laid out from scratch using
|
// This child needs to be laid out from scratch using
|
||||||
// only its share of excess space.
|
// only its share of excess space.
|
||||||
|
|||||||
Reference in New Issue
Block a user