Merge "Don't match wrap_content/match_parent children with child count = 1. Bug #3328711" into honeycomb
This commit is contained in:
@@ -297,15 +297,15 @@ public class FrameLayout extends ViewGroup {
|
||||
resolveSizeAndState(maxHeight, heightMeasureSpec,
|
||||
childState << MEASURED_HEIGHT_STATE_SHIFT));
|
||||
|
||||
if (mMatchParentChildren.size() > 0) {
|
||||
count = mMatchParentChildren.size();
|
||||
count = mMatchParentChildren.size();
|
||||
if (count > 1) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
final View child = mMatchParentChildren.get(i);
|
||||
|
||||
final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
|
||||
int childWidthMeasureSpec;
|
||||
int childHeightMeasureSpec;
|
||||
|
||||
|
||||
if (lp.width == LayoutParams.MATCH_PARENT) {
|
||||
childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(getMeasuredWidth() -
|
||||
mPaddingLeft - mPaddingRight - lp.leftMargin - lp.rightMargin,
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.widget;
|
||||
|
||||
import android.view.ViewDebug;
|
||||
import com.android.internal.R;
|
||||
|
||||
import android.util.AttributeSet;
|
||||
@@ -115,6 +116,7 @@ public class HorizontalScrollView extends FrameLayout {
|
||||
* When set to true, the scroll view measure its child to make it fill the currently
|
||||
* visible area.
|
||||
*/
|
||||
@ViewDebug.ExportedProperty(category = "layout")
|
||||
private boolean mFillViewport;
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.widget;
|
||||
|
||||
import android.view.ViewDebug;
|
||||
import com.android.internal.R;
|
||||
|
||||
import android.content.Context;
|
||||
@@ -110,6 +111,7 @@ public class ScrollView extends FrameLayout {
|
||||
* When set to true, the scroll view measure its child to make it fill the currently
|
||||
* visible area.
|
||||
*/
|
||||
@ViewDebug.ExportedProperty(category = "layout")
|
||||
private boolean mFillViewport;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user