Loading core/java/com/android/internal/view/menu/IconMenuView.java +9 −2 Original line number Diff line number Diff line Loading @@ -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 = Loading Loading @@ -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 Loading Loading
core/java/com/android/internal/view/menu/IconMenuView.java +9 −2 Original line number Diff line number Diff line Loading @@ -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 = Loading Loading @@ -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 Loading