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

Commit 650e22ca authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix monkey bug 2512055"

parents 82ce6f1c 22cb2f46
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -179,6 +179,10 @@ public final class IconMenuView extends ViewGroup implements ItemInvoker, MenuVi
     */
    private void layoutItems(int width) {
        int numItems = getChildCount();
        if (numItems == 0) {
            mLayoutNumRows = 0;
            return;
        }
        
        // Start with the least possible number of rows
        int curNumRows =
@@ -470,16 +474,19 @@ public final class IconMenuView extends ViewGroup implements ItemInvoker, MenuVi
        
        // Get the desired height of the icon menu view (last row of items does
        // not have a divider below)
        final int layoutNumRows = mLayoutNumRows;
        final int desiredHeight = (mRowHeight + mHorizontalDividerHeight) *
                mLayoutNumRows - mHorizontalDividerHeight;
                layoutNumRows - mHorizontalDividerHeight;
        
        // Maximum possible width and desired height
        setMeasuredDimension(measuredWidth,
                resolveSize(desiredHeight, heightMeasureSpec));

        // Position the children
        if (layoutNumRows > 0) {
            positionChildren(mMeasuredWidth, mMeasuredHeight);
        }
    }


    @Override