diff --git a/mobile/android/base/GeckoMenuInflater.java b/mobile/android/base/GeckoMenuInflater.java index 342ec0021fa..0cce15fb739 100644 --- a/mobile/android/base/GeckoMenuInflater.java +++ b/mobile/android/base/GeckoMenuInflater.java @@ -41,7 +41,7 @@ public class GeckoMenuInflater extends MenuInflater { public boolean checked; public boolean visible; public boolean enabled; - public boolean showAsAction; + public int showAsAction; } public GeckoMenuInflater(Context context) { @@ -126,15 +126,15 @@ public class GeckoMenuInflater extends MenuInflater { public void parseItem(ParsedItem item, AttributeSet attrs) { TypedArray a = mContext.obtainStyledAttributes(attrs, R.styleable.MenuItem); - item.id = a.getResourceId(R.styleable.MenuItem_id, NO_ID); - item.order = a.getInt(R.styleable.MenuItem_orderInCategory, 0); - item.title = a.getText(R.styleable.MenuItem_title); - item.iconRes = a.getResourceId(R.styleable.MenuItem_icon, 0); - item.checkable = a.getBoolean(R.styleable.MenuItem_checkable, false); - item.checked = a.getBoolean(R.styleable.MenuItem_checked, false); - item.visible = a.getBoolean(R.styleable.MenuItem_visible, true); - item.enabled = a.getBoolean(R.styleable.MenuItem_enabled, true); - item.showAsAction = a.getBoolean(R.styleable.MenuItem_showAsAction, false); + item.id = a.getResourceId(R.styleable.MenuItem_android_id, NO_ID); + item.order = a.getInt(R.styleable.MenuItem_android_orderInCategory, 0); + item.title = a.getText(R.styleable.MenuItem_android_title); + item.iconRes = a.getResourceId(R.styleable.MenuItem_android_icon, 0); + item.checkable = a.getBoolean(R.styleable.MenuItem_android_checkable, false); + item.checked = a.getBoolean(R.styleable.MenuItem_android_checked, false); + item.visible = a.getBoolean(R.styleable.MenuItem_android_visible, true); + item.enabled = a.getBoolean(R.styleable.MenuItem_android_enabled, true); + item.showAsAction = a.getInt(R.styleable.MenuItem_android_showAsAction, 0); a.recycle(); } @@ -146,6 +146,6 @@ public class GeckoMenuInflater extends MenuInflater { .setCheckable(item.checkable) .setCheckable(item.checked) .setIcon(item.iconRes) - .setShowAsAction(item.showAsAction ? 1 : 0); + .setShowAsAction(item.showAsAction); } } diff --git a/mobile/android/base/GeckoMenuItem.java b/mobile/android/base/GeckoMenuItem.java index f5e96909148..570867a2a36 100644 --- a/mobile/android/base/GeckoMenuItem.java +++ b/mobile/android/base/GeckoMenuItem.java @@ -276,10 +276,10 @@ public class GeckoMenuItem implements MenuItem, View.OnClickListener { if (mShowAsActionChangedListener == null) return; - if (mActionItem == (actionEnum == 1)) + if (mActionItem == (actionEnum > 0)) return; - if (actionEnum == 1) { + if (actionEnum > 0) { if (!mShowAsActionChangedListener.hasActionItemBar()) return; @@ -290,7 +290,7 @@ public class GeckoMenuItem implements MenuItem, View.OnClickListener { mLayout = new MenuItemDefault(mContext, null); } - mActionItem = (actionEnum == 1); + mActionItem = (actionEnum > 0); mLayout.setId(mId); mLayout.setOnClickListener(this); diff --git a/mobile/android/base/Makefile.in b/mobile/android/base/Makefile.in index 8a6aca889f1..ec48438481e 100644 --- a/mobile/android/base/Makefile.in +++ b/mobile/android/base/Makefile.in @@ -214,8 +214,6 @@ FENNEC_PP_XML_FILES = \ res/xml/preferences.xml \ res/menu/browser_app_menu.xml \ res/menu-v11/browser_app_menu.xml \ - res/menu-v11/gecko_app_menu.xml \ - res/menu-v11/titlebar_contextmenu.xml \ res/menu-large-v11/browser_app_menu.xml \ res/menu-xlarge-v11/browser_app_menu.xml \ $(NULL) diff --git a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in index 76729e50f3d..5340dc76e66 100644 --- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in +++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in @@ -1,68 +1,67 @@ -#filter substitution -