Merge "Fix bug 4416126 - orientation change bug with action bar overflow menu" into honeycomb-mr2

This commit is contained in:
Adam Powell
2011-05-17 20:24:39 -07:00
committed by Android (Google) Code Review

View File

@@ -104,9 +104,7 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo
@Override @Override
public void onConfigurationChanged(Configuration newConfig) { public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig); super.onConfigurationChanged(newConfig);
final int screen = newConfig.screenLayout; mReserveOverflow = newConfig.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE);
mReserveOverflow = (screen & Configuration.SCREENLAYOUT_SIZE_MASK) ==
Configuration.SCREENLAYOUT_SIZE_XLARGE;
mMaxItems = getMaxActionButtons(); mMaxItems = getMaxActionButtons();
mWidthLimit = getResources().getDisplayMetrics().widthPixels / 2; mWidthLimit = getResources().getDisplayMetrics().widthPixels / 2;
if (mMenu != null) { if (mMenu != null) {