diff options
| author | 2013-02-04 17:22:08 -0800 | |
|---|---|---|
| committer | 2013-02-04 17:22:08 -0800 | |
| commit | 7663f57bc71cb74d8d404910c2f16ad3ee5aa331 (patch) | |
| tree | 3c394c70780499a2b673c67ff782f1929af0000f | |
| parent | 31ffa869eaf3fa541234eb5ba0c49842ceaf2149 (diff) | |
| parent | 9c684aab21b095a936e5753fbba378c0a27aa254 (diff) | |
am 9c684aab: am 638af2fb: am 6a33c403: am 569f138e: am 67389e0a: Merge "Fix regression in expanded action view up" into jb-mr1.1-dev
# Via Android Git Automerger (4) and others
* commit '9c684aab21b095a936e5753fbba378c0a27aa254':
Fix regression in expanded action view up
| -rw-r--r-- | core/java/com/android/internal/widget/ActionBarView.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java index 560227d1bb3c..12a7491e7752 100644 --- a/core/java/com/android/internal/widget/ActionBarView.java +++ b/core/java/com/android/internal/widget/ActionBarView.java @@ -122,6 +122,7 @@ public class ActionBarView extends AbsActionBarView { private boolean mIncludeTabs; private boolean mIsCollapsable; private boolean mIsCollapsed; + private boolean mWasHomeEnabled; // Was it enabled before action view expansion? private MenuBuilder mOptionsMenu; @@ -227,6 +228,15 @@ public class ActionBarView extends AbsActionBarView { mExpandedHomeLayout.setContentDescription(getResources().getText( 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); mSubtitleStyleRes = a.getResourceId(R.styleable.ActionBar_subtitleTextStyle, 0); mProgressStyle = a.getResourceId(R.styleable.ActionBar_progressBarStyle, 0); @@ -1530,6 +1540,8 @@ public class ActionBarView extends AbsActionBarView { if (mTabScrollView != null) mTabScrollView.setVisibility(GONE); if (mSpinner != null) mSpinner.setVisibility(GONE); if (mCustomNavView != null) mCustomNavView.setVisibility(GONE); + mWasHomeEnabled = mUpGoerFive.isEnabled(); + setHomeButtonEnabled(false); requestLayout(); item.setActionViewExpanded(true); @@ -1572,6 +1584,7 @@ public class ActionBarView extends AbsActionBarView { } mExpandedHomeLayout.setIcon(null); mCurrentExpandedItem = null; + setHomeButtonEnabled(mWasHomeEnabled); // Set by expandItemActionView above requestLayout(); item.setActionViewExpanded(false); |