summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2011-10-12 12:13:45 -0700
committerAdam Powell <adamp@google.com>2011-10-12 12:13:45 -0700
commitf2894659e8df625783afcd3fa17462ab23d29145 (patch)
treeb4d87a24e79e1a8aaca6572a0428b2240af8aff2
parentc291653539fd0a8b6b73a1174aa80afdb62272e5 (diff)
downloadframeworks_base-f2894659e8df625783afcd3fa17462ab23d29145.zip
frameworks_base-f2894659e8df625783afcd3fa17462ab23d29145.tar.gz
frameworks_base-f2894659e8df625783afcd3fa17462ab23d29145.tar.bz2
Fix bug 5449931 - Wrong theme for icon menus
IconMenuPresenter should always use its own theme for the system inflater. Change-Id: Iacadce37d62a60cdf6220d82f1178098ed92d51e
-rw-r--r--core/java/com/android/internal/view/menu/IconMenuPresenter.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/java/com/android/internal/view/menu/IconMenuPresenter.java b/core/java/com/android/internal/view/menu/IconMenuPresenter.java
index 3b1decd..2439b5d 100644
--- a/core/java/com/android/internal/view/menu/IconMenuPresenter.java
+++ b/core/java/com/android/internal/view/menu/IconMenuPresenter.java
@@ -22,7 +22,6 @@ import android.os.Bundle;
import android.os.Parcelable;
import android.util.SparseArray;
import android.view.ContextThemeWrapper;
-import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
@@ -44,15 +43,14 @@ public class IconMenuPresenter extends BaseMenuPresenter {
private static final String OPEN_SUBMENU_KEY = "android:menu:icon:submenu";
public IconMenuPresenter(Context context) {
- super(context, com.android.internal.R.layout.icon_menu_layout,
+ super(new ContextThemeWrapper(context, com.android.internal.R.style.Theme_IconMenu),
+ com.android.internal.R.layout.icon_menu_layout,
com.android.internal.R.layout.icon_menu_item_layout);
}
@Override
public void initForMenu(Context context, MenuBuilder menu) {
- mContext = new ContextThemeWrapper(context, com.android.internal.R.style.Theme_IconMenu);
- mInflater = LayoutInflater.from(mContext);
- mMenu = menu;
+ super.initForMenu(context, menu);
mMaxItems = -1;
}