Loading core/java/com/android/internal/widget/ActionBarView.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,7 @@ public class ActionBarView extends AbsActionBarView { private boolean mIncludeTabs; private boolean mIncludeTabs; private boolean mIsCollapsable; private boolean mIsCollapsable; private boolean mIsCollapsed; private boolean mIsCollapsed; private boolean mWasHomeEnabled; // Was it enabled before action view expansion? private MenuBuilder mOptionsMenu; private MenuBuilder mOptionsMenu; Loading Loading @@ -227,6 +228,15 @@ public class ActionBarView extends AbsActionBarView { mExpandedHomeLayout.setContentDescription(getResources().getText( mExpandedHomeLayout.setContentDescription(getResources().getText( R.string.action_bar_up_description)); R.string.action_bar_up_description)); // This needs to highlight/be focusable on its own. // TODO: Clean up the handoff between expanded/normal. final Drawable upBackground = mUpGoerFive.getBackground(); if (upBackground != null) { mExpandedHomeLayout.setBackground(upBackground.getConstantState().newDrawable()); } mExpandedHomeLayout.setEnabled(true); mExpandedHomeLayout.setFocusable(true); mTitleStyleRes = a.getResourceId(R.styleable.ActionBar_titleTextStyle, 0); mTitleStyleRes = a.getResourceId(R.styleable.ActionBar_titleTextStyle, 0); mSubtitleStyleRes = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); mSubtitleStyleRes = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); mProgressStyle = a.getResourceId(R.styleable.ActionBar_progressBarStyle, 0); mProgressStyle = a.getResourceId(R.styleable.ActionBar_progressBarStyle, 0); Loading Loading @@ -1529,6 +1539,8 @@ public class ActionBarView extends AbsActionBarView { if (mTabScrollView != null) mTabScrollView.setVisibility(GONE); if (mTabScrollView != null) mTabScrollView.setVisibility(GONE); if (mSpinner != null) mSpinner.setVisibility(GONE); if (mSpinner != null) mSpinner.setVisibility(GONE); if (mCustomNavView != null) mCustomNavView.setVisibility(GONE); if (mCustomNavView != null) mCustomNavView.setVisibility(GONE); mWasHomeEnabled = mUpGoerFive.isEnabled(); setHomeButtonEnabled(false); requestLayout(); requestLayout(); item.setActionViewExpanded(true); item.setActionViewExpanded(true); Loading Loading @@ -1571,6 +1583,7 @@ public class ActionBarView extends AbsActionBarView { } } mExpandedHomeLayout.setIcon(null); mExpandedHomeLayout.setIcon(null); mCurrentExpandedItem = null; mCurrentExpandedItem = null; setHomeButtonEnabled(mWasHomeEnabled); // Set by expandItemActionView above requestLayout(); requestLayout(); item.setActionViewExpanded(false); item.setActionViewExpanded(false); Loading Loading
core/java/com/android/internal/widget/ActionBarView.java +13 −0 Original line number Original line Diff line number Diff line Loading @@ -122,6 +122,7 @@ public class ActionBarView extends AbsActionBarView { private boolean mIncludeTabs; private boolean mIncludeTabs; private boolean mIsCollapsable; private boolean mIsCollapsable; private boolean mIsCollapsed; private boolean mIsCollapsed; private boolean mWasHomeEnabled; // Was it enabled before action view expansion? private MenuBuilder mOptionsMenu; private MenuBuilder mOptionsMenu; Loading Loading @@ -227,6 +228,15 @@ public class ActionBarView extends AbsActionBarView { mExpandedHomeLayout.setContentDescription(getResources().getText( mExpandedHomeLayout.setContentDescription(getResources().getText( R.string.action_bar_up_description)); R.string.action_bar_up_description)); // This needs to highlight/be focusable on its own. // TODO: Clean up the handoff between expanded/normal. final Drawable upBackground = mUpGoerFive.getBackground(); if (upBackground != null) { mExpandedHomeLayout.setBackground(upBackground.getConstantState().newDrawable()); } mExpandedHomeLayout.setEnabled(true); mExpandedHomeLayout.setFocusable(true); mTitleStyleRes = a.getResourceId(R.styleable.ActionBar_titleTextStyle, 0); mTitleStyleRes = a.getResourceId(R.styleable.ActionBar_titleTextStyle, 0); mSubtitleStyleRes = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); mSubtitleStyleRes = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); mProgressStyle = a.getResourceId(R.styleable.ActionBar_progressBarStyle, 0); mProgressStyle = a.getResourceId(R.styleable.ActionBar_progressBarStyle, 0); Loading Loading @@ -1529,6 +1539,8 @@ public class ActionBarView extends AbsActionBarView { if (mTabScrollView != null) mTabScrollView.setVisibility(GONE); if (mTabScrollView != null) mTabScrollView.setVisibility(GONE); if (mSpinner != null) mSpinner.setVisibility(GONE); if (mSpinner != null) mSpinner.setVisibility(GONE); if (mCustomNavView != null) mCustomNavView.setVisibility(GONE); if (mCustomNavView != null) mCustomNavView.setVisibility(GONE); mWasHomeEnabled = mUpGoerFive.isEnabled(); setHomeButtonEnabled(false); requestLayout(); requestLayout(); item.setActionViewExpanded(true); item.setActionViewExpanded(true); Loading Loading @@ -1571,6 +1583,7 @@ public class ActionBarView extends AbsActionBarView { } } mExpandedHomeLayout.setIcon(null); mExpandedHomeLayout.setIcon(null); mCurrentExpandedItem = null; mCurrentExpandedItem = null; setHomeButtonEnabled(mWasHomeEnabled); // Set by expandItemActionView above requestLayout(); requestLayout(); item.setActionViewExpanded(false); item.setActionViewExpanded(false); Loading