Loading core/java/com/android/internal/widget/ActionBarView.java +12 −5 Original line number Diff line number Diff line Loading @@ -163,7 +163,6 @@ public class ActionBarView extends ViewGroup { LayoutInflater inflater = LayoutInflater.from(context); mCustomNavView = (View) inflater.inflate(customNavId, null); mNavigationMode = ActionBar.NAVIGATION_MODE_CUSTOM; addView(mCustomNavView); } mContentHeight = a.getLayoutDimension(R.styleable.ActionBar_height, 0); Loading Loading @@ -553,7 +552,7 @@ public class ActionBarView extends ViewGroup { if (mSpinner != null) { mSpinner.measure( MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST)); } break; case ActionBar.NAVIGATION_MODE_CUSTOM: Loading @@ -563,8 +562,16 @@ public class ActionBarView extends ViewGroup { MeasureSpec.EXACTLY : MeasureSpec.AT_MOST; final int customNavWidth = lp.width >= 0 ? Math.min(lp.width, availableWidth) : availableWidth; final int customNavHeightMode = lp.height != LayoutParams.WRAP_CONTENT ? // If the action bar is wrapping to its content height, don't allow a custom // view to MATCH_PARENT. int customNavHeightMode; if (mContentHeight <= 0) { customNavHeightMode = MeasureSpec.AT_MOST; } else { customNavHeightMode = lp.height != LayoutParams.WRAP_CONTENT ? MeasureSpec.EXACTLY : MeasureSpec.AT_MOST; } final int customNavHeight = lp.height >= 0 ? Math.min(lp.height, height) : height; mCustomNavView.measure( Loading @@ -576,7 +583,7 @@ public class ActionBarView extends ViewGroup { if (mTabLayout != null) { mTabLayout.measure( MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST)); } break; } Loading policy/src/com/android/internal/policy/impl/PhoneWindow.java +9 −10 Original line number Diff line number Diff line Loading @@ -643,8 +643,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { boolean playSoundEffect = false; final PanelFeatureState st = getPanelState(featureId, true); if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null) { if (mActionBar.isOverflowReserved()) { if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null && mActionBar.isOverflowReserved()) { if (!mActionBar.isOverflowMenuShowing()) { final Callback cb = getCallback(); if (cb != null && Loading @@ -654,7 +654,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } else { playSoundEffect = mActionBar.hideOverflowMenu(); } } } else { if (st.isOpen || st.isHandled) { Loading Loading
core/java/com/android/internal/widget/ActionBarView.java +12 −5 Original line number Diff line number Diff line Loading @@ -163,7 +163,6 @@ public class ActionBarView extends ViewGroup { LayoutInflater inflater = LayoutInflater.from(context); mCustomNavView = (View) inflater.inflate(customNavId, null); mNavigationMode = ActionBar.NAVIGATION_MODE_CUSTOM; addView(mCustomNavView); } mContentHeight = a.getLayoutDimension(R.styleable.ActionBar_height, 0); Loading Loading @@ -553,7 +552,7 @@ public class ActionBarView extends ViewGroup { if (mSpinner != null) { mSpinner.measure( MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST)); } break; case ActionBar.NAVIGATION_MODE_CUSTOM: Loading @@ -563,8 +562,16 @@ public class ActionBarView extends ViewGroup { MeasureSpec.EXACTLY : MeasureSpec.AT_MOST; final int customNavWidth = lp.width >= 0 ? Math.min(lp.width, availableWidth) : availableWidth; final int customNavHeightMode = lp.height != LayoutParams.WRAP_CONTENT ? // If the action bar is wrapping to its content height, don't allow a custom // view to MATCH_PARENT. int customNavHeightMode; if (mContentHeight <= 0) { customNavHeightMode = MeasureSpec.AT_MOST; } else { customNavHeightMode = lp.height != LayoutParams.WRAP_CONTENT ? MeasureSpec.EXACTLY : MeasureSpec.AT_MOST; } final int customNavHeight = lp.height >= 0 ? Math.min(lp.height, height) : height; mCustomNavView.measure( Loading @@ -576,7 +583,7 @@ public class ActionBarView extends ViewGroup { if (mTabLayout != null) { mTabLayout.measure( MeasureSpec.makeMeasureSpec(availableWidth, MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)); MeasureSpec.makeMeasureSpec(height, MeasureSpec.AT_MOST)); } break; } Loading
policy/src/com/android/internal/policy/impl/PhoneWindow.java +9 −10 Original line number Diff line number Diff line Loading @@ -643,8 +643,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { boolean playSoundEffect = false; final PanelFeatureState st = getPanelState(featureId, true); if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null) { if (mActionBar.isOverflowReserved()) { if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null && mActionBar.isOverflowReserved()) { if (!mActionBar.isOverflowMenuShowing()) { final Callback cb = getCallback(); if (cb != null && Loading @@ -654,7 +654,6 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } else { playSoundEffect = mActionBar.hideOverflowMenu(); } } } else { if (st.isOpen || st.isHandled) { Loading