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

Commit ed0e11a9 authored by Alan Viverette's avatar Alan Viverette Committed by Android (Google) Code Review
Browse files

Merge "Ensure child is attached before performing measure/layout in Spinner" into mnc-dev

parents c16a26a2 25c6cd61
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -711,9 +711,7 @@ public class Spinner extends AbsSpinner implements OnClickListener {
            lp = generateDefaultLayoutParams();
        }

        if (addChild) {
        addViewInLayout(child, 0, lp);
        }

        child.setSelected(hasFocus());
        if (mDisableChildrenWhenDisabled) {
@@ -743,6 +741,10 @@ public class Spinner extends AbsSpinner implements OnClickListener {
        childRight = childLeft + width;

        child.layout(childLeft, childTop, childRight, childBottom);

        if (!addChild) {
            removeViewInLayout(child);
        }
    }

    @Override