Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a174d7a0 authored by Romain Guy's avatar Romain Guy
Browse files

Don't match wrap_content/match_parent children with child count = 1.

Bug #3328711

Change-Id: Ic131f2feecbeec4a7250d47193c9794aa70d22ee
parent cf70dcb0
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -297,8 +297,8 @@ public class FrameLayout extends ViewGroup {
                resolveSizeAndState(maxHeight, heightMeasureSpec,
                        childState << MEASURED_HEIGHT_STATE_SHIFT));

        if (mMatchParentChildren.size() > 0) {
        count = mMatchParentChildren.size();
        if (count > 1) {
            for (int i = 0; i < count; i++) {
                final View child = mMatchParentChildren.get(i);

+2 −0
Original line number Diff line number Diff line
@@ -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;

    /**
+2 −0
Original line number Diff line number Diff line
@@ -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;

    /**