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:
Adam Powell
2011-07-15 20:17:25 -07:00
parent 8132ba5e2e
commit 28fa07e15f
2 changed files with 3 additions and 5 deletions

View File

@@ -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) {

View File

@@ -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);