Fix bug 5021359 - show app icon for collapsible action views.
Also fix a bug with initial enabled state of the app-home button. Change-Id: I7eac4932deeced3ac209ad899922ac90f40c87e6
This commit is contained in:
@@ -159,10 +159,8 @@ public class ActionBarImpl extends ActionBar {
|
||||
|
||||
// Older apps get the home button interaction enabled by default.
|
||||
// Newer apps need to enable it explicitly.
|
||||
if (mContext.getApplicationInfo().targetSdkVersion <
|
||||
Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||
setHomeButtonEnabled(true);
|
||||
}
|
||||
setHomeButtonEnabled(mContext.getApplicationInfo().targetSdkVersion <
|
||||
Build.VERSION_CODES.ICE_CREAM_SANDWICH);
|
||||
}
|
||||
|
||||
public void onConfigurationChanged(Configuration newConfig) {
|
||||
|
||||
@@ -1272,7 +1272,7 @@ public class ActionBarView extends AbsActionBarView {
|
||||
@Override
|
||||
public boolean expandItemActionView(MenuBuilder menu, MenuItemImpl item) {
|
||||
mExpandedActionView = item.getActionView();
|
||||
mExpandedHomeLayout.setIcon(item.getIcon());
|
||||
mExpandedHomeLayout.setIcon(mIcon.getConstantState().newDrawable(getResources()));
|
||||
mCurrentExpandedItem = item;
|
||||
if (mExpandedActionView.getParent() != ActionBarView.this) {
|
||||
addView(mExpandedActionView);
|
||||
|
||||
Reference in New Issue
Block a user