From 5ddba12a47e778e1bb4e35fb11449957cec7501e Mon Sep 17 00:00:00 2001 From: Sriram Ramasubramanian Date: Wed, 18 Dec 2013 18:46:42 -0800 Subject: [PATCH] Bug 940997: Reorganize primary controls in main menu. [r=mfinkle] --- mobile/android/base/BrowserApp.java | 10 +++ mobile/android/base/menu/GeckoMenu.java | 16 +++- .../android/base/menu/MenuItemActionBar.java | 3 - mobile/android/base/menu/MenuPopup.java | 71 +++--------------- .../drawable-hdpi-v11/ic_menu_back.png | Bin 393 -> 1580 bytes .../resources/drawable-hdpi/ic_menu_share.png | Bin 757 -> 2022 bytes .../drawable-large-hdpi-v11/ic_menu_back.png | Bin 0 -> 393 bytes .../drawable-large-mdpi-v11/ic_menu_back.png | Bin 0 -> 278 bytes .../drawable-large-xhdpi-v11/ic_menu_back.png | Bin 0 -> 593 bytes .../drawable-mdpi-v11/ic_menu_back.png | Bin 278 -> 1337 bytes .../resources/drawable-mdpi/ic_menu_share.png | Bin 573 -> 1658 bytes .../drawable-xhdpi-v11/ic_menu_back.png | Bin 593 -> 1702 bytes .../drawable-xhdpi/ic_menu_share.png | Bin 1033 -> 2429 bytes .../base/resources/layout/menu_action_bar.xml | 4 +- .../layout/menu_item_action_view.xml | 2 +- .../base/resources/layout/menu_popup.xml | 39 +++------- .../menu-large-v11/browser_app_menu.xml | 13 +++- .../resources/menu-v11/browser_app_menu.xml | 14 ++-- .../menu-xlarge-v11/browser_app_menu.xml | 5 ++ .../base/resources/menu/browser_app_menu.xml | 5 ++ .../resources/values-large-v11/styles.xml | 8 ++ .../base/resources/values-v11/themes.xml | 1 + .../android/base/resources/values/attrs.xml | 3 + .../android/base/resources/values/styles.xml | 8 +- .../android/base/resources/values/themes.xml | 1 + .../android/base/widget/GeckoPopupMenu.java | 9 --- 26 files changed, 93 insertions(+), 119 deletions(-) create mode 100644 mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_back.png create mode 100644 mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_back.png create mode 100644 mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_back.png diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index 59f3a30aafe1..685d78852d76 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -2053,6 +2053,7 @@ abstract public class BrowserApp extends GeckoApp Tab tab = Tabs.getInstance().getSelectedTab(); MenuItem bookmark = aMenu.findItem(R.id.bookmark); + MenuItem back = aMenu.findItem(R.id.back); MenuItem forward = aMenu.findItem(R.id.forward); MenuItem share = aMenu.findItem(R.id.share); MenuItem saveAsPDF = aMenu.findItem(R.id.save_as_pdf); @@ -2068,6 +2069,7 @@ abstract public class BrowserApp extends GeckoApp if (tab == null || tab.getURL() == null) { bookmark.setEnabled(false); + back.setEnabled(false); forward.setEnabled(false); share.setEnabled(false); saveAsPDF.setEnabled(false); @@ -2080,6 +2082,7 @@ abstract public class BrowserApp extends GeckoApp bookmark.setChecked(tab.isBookmark()); bookmark.setIcon(tab.isBookmark() ? R.drawable.ic_menu_bookmark_remove : R.drawable.ic_menu_bookmark_add); + back.setEnabled(tab.canDoBack()); forward.setEnabled(tab.canDoForward()); desktopMode.setChecked(tab.getDesktopMode()); desktopMode.setIcon(tab.getDesktopMode() ? R.drawable.ic_menu_desktop_mode_on : R.drawable.ic_menu_desktop_mode_off); @@ -2209,6 +2212,13 @@ abstract public class BrowserApp extends GeckoApp return true; } + if (itemId == R.id.back) { + tab = Tabs.getInstance().getSelectedTab(); + if (tab != null) + tab.doBack(); + return true; + } + if (itemId == R.id.forward) { tab = Tabs.getInstance().getSelectedTab(); if (tab != null) diff --git a/mobile/android/base/menu/GeckoMenu.java b/mobile/android/base/menu/GeckoMenu.java index 64e178e8e5a3..af9b0778b4d5 100644 --- a/mobile/android/base/menu/GeckoMenu.java +++ b/mobile/android/base/menu/GeckoMenu.java @@ -98,7 +98,7 @@ public class GeckoMenu extends ListView } public GeckoMenu(Context context, AttributeSet attrs) { - this(context, attrs, android.R.attr.listViewStyle); + this(context, attrs, R.attr.geckoMenuListViewStyle); } public GeckoMenu(Context context, AttributeSet attrs, int defStyle) { @@ -498,6 +498,8 @@ public class GeckoMenu extends ListView // URL bar can register itself as a presenter, in case it has a different place to show them. public static class DefaultActionItemBar extends LinearLayout implements ActionItemBarPresenter { + private final int mRowHeight; + public DefaultActionItemBar(Context context) { this(context, null); } @@ -505,12 +507,22 @@ public class GeckoMenu extends ListView public DefaultActionItemBar(Context context, AttributeSet attrs) { super(context, attrs); + mRowHeight = getResources().getDimensionPixelSize(R.dimen.menu_item_row_height); setWeightSum(3.0f); } @Override public boolean addActionItem(View actionItem) { - LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(actionItem.getLayoutParams()); + ViewGroup.LayoutParams actualParams = actionItem.getLayoutParams(); + LinearLayout.LayoutParams params; + + if (actualParams != null) { + params = new LinearLayout.LayoutParams(actionItem.getLayoutParams()); + params.width = 0; + } else { + params = new LinearLayout.LayoutParams(0, mRowHeight); + } + params.weight = 1.0f; actionItem.setLayoutParams(params); addView(actionItem); diff --git a/mobile/android/base/menu/MenuItemActionBar.java b/mobile/android/base/menu/MenuItemActionBar.java index 5f02500efae7..8ff6389aadf6 100644 --- a/mobile/android/base/menu/MenuItemActionBar.java +++ b/mobile/android/base/menu/MenuItemActionBar.java @@ -26,9 +26,6 @@ public class MenuItemActionBar extends ImageButton public MenuItemActionBar(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); - - int size = (int) (context.getResources().getDimension(R.dimen.browser_toolbar_height)); - setLayoutParams(new ViewGroup.LayoutParams(size, size)); } @Override diff --git a/mobile/android/base/menu/MenuPopup.java b/mobile/android/base/menu/MenuPopup.java index eb5ed684f276..d076e48866fb 100644 --- a/mobile/android/base/menu/MenuPopup.java +++ b/mobile/android/base/menu/MenuPopup.java @@ -8,41 +8,30 @@ package org.mozilla.gecko.menu; import org.mozilla.gecko.R; import android.content.Context; -import android.content.res.Resources; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.PopupWindow; -import android.widget.RelativeLayout; -import android.widget.RelativeLayout.LayoutParams; /** - * A popup to show the inflated MenuPanel. This has an arrow pointing to the anchor. + * A popup to show the inflated MenuPanel. */ public class MenuPopup extends PopupWindow { - private Resources mResources; - - private ImageView mArrowTop; - private ImageView mArrowBottom; - private RelativeLayout mPanel; + private LinearLayout mPanel; private int mYOffset; - private int mArrowMargin; private int mPopupWidth; - private boolean mShowArrow; public MenuPopup(Context context) { super(context); - mResources = context.getResources(); setFocusable(true); - mYOffset = mResources.getDimensionPixelSize(R.dimen.menu_popup_offset); - mArrowMargin = mResources.getDimensionPixelSize(R.dimen.menu_popup_arrow_margin); - mPopupWidth = mResources.getDimensionPixelSize(R.dimen.menu_popup_width); + mYOffset = context.getResources().getDimensionPixelSize(R.dimen.menu_popup_offset); + mPopupWidth = context.getResources().getDimensionPixelSize(R.dimen.menu_popup_width); // Setting a null background makes the popup to not close on touching outside. setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); @@ -50,13 +39,9 @@ public class MenuPopup extends PopupWindow { ViewGroup.LayoutParams.WRAP_CONTENT); LayoutInflater inflater = LayoutInflater.from(context); - RelativeLayout layout = (RelativeLayout) inflater.inflate(R.layout.menu_popup, null); - setContentView(layout); + mPanel = (LinearLayout) inflater.inflate(R.layout.menu_popup, null); + setContentView(mPanel); - mArrowTop = (ImageView) layout.findViewById(R.id.menu_arrow_top); - mArrowBottom = (ImageView) layout.findViewById(R.id.menu_arrow_bottom); - mPanel = (RelativeLayout) layout.findViewById(R.id.menu_panel); - mShowArrow = true; setAnimationStyle(R.style.PopupAnimation); } @@ -66,52 +51,18 @@ public class MenuPopup extends PopupWindow { * @param view The panel view with the menu to be shown. */ public void setPanelView(View view) { + view.setLayoutParams(new LinearLayout.LayoutParams(mPopupWidth, + LinearLayout.LayoutParams.WRAP_CONTENT)); + mPanel.removeAllViews(); mPanel.addView(view); - mPanel.measure(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); } /** - * Show/hide the arrow pointing to the anchor. - * - * @param show Show/hide the arrow. - */ - public void showArrowToAnchor(boolean show) { - mShowArrow = show; - } - - /** - * A small little offset for the arrow to overlap the anchor. + * A small little offset. */ @Override public void showAsDropDown(View anchor) { - if (!mShowArrow) { - mArrowTop.setVisibility(View.GONE); - mArrowBottom.setVisibility(View.GONE); - showAsDropDown(anchor, 0, -mYOffset); - return; - } - - int[] anchorLocation = new int[2]; - anchor.getLocationOnScreen(anchorLocation); - - int screenWidth = mResources.getDisplayMetrics().widthPixels; - int arrowWidth = mResources.getDimensionPixelSize(R.dimen.menu_popup_arrow_width); - int arrowOffset = (anchor.getWidth() - arrowWidth)/2; - - if (anchorLocation[0] + mPopupWidth <= screenWidth) { - // left align - ((LayoutParams) mArrowTop.getLayoutParams()).rightMargin = mPopupWidth - anchor.getWidth() + arrowOffset; - ((LayoutParams) mArrowBottom.getLayoutParams()).rightMargin = mPopupWidth - anchor.getWidth() + arrowOffset; - } else { - // right align - ((LayoutParams) mArrowTop.getLayoutParams()).rightMargin = screenWidth - anchorLocation[0] - anchor.getWidth()/2 - arrowWidth/2; - ((LayoutParams) mArrowBottom.getLayoutParams()).rightMargin = mArrowMargin; - } - - // shown below anchor - mArrowTop.setVisibility(View.VISIBLE); - mArrowBottom.setVisibility(View.GONE); showAsDropDown(anchor, 0, -mYOffset); } } diff --git a/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_back.png b/mobile/android/base/resources/drawable-hdpi-v11/ic_menu_back.png index d7303f4d15fe613fb88324fb0b5a256fc083b3f0..875f595442801d901f9545ab04c66535682241c9 100644 GIT binary patch literal 1580 zcmbVMeM}Q)7(Xmjt%}Z%q_9cO(-BeI`)Et=&Q>UGk!BPTDxjOpqdn;j+PmEywlIT; z6lQdB^8=S@T%B_>N|2b%`fX*KpW8HUqRyFh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%#r6W=Qi{w=U2{v%MR|dt_zkLTFVmggohEdb^KP#myZsgZGU;N(nkWJ ep45}?12SNs_VAJ0HgtOQ|82A8Sz5D})c+0M5<*%4 literal 393 zcmV;40e1e0P)wl1oNO^`m{p94kVaI1@l1-3U(mDbSM^R zL`Mlorm0Ya6!cE9WGSd$8uZ_O*)Rpo(o?}j-5xjgos6+xwjTRQ_o7c~Sc05)YaQf# zp6MXx6JG~8--&dP^Q}<_Ip3>wkn_t!2RXmZbdc5SweAVZdEf8&f{0GXV7fHt3zCi# n%q!Kr*HBuEdh|>Sf0?o$dCM7<*(vCP00000NkvXXu0mjfmG7)8 diff --git a/mobile/android/base/resources/drawable-hdpi/ic_menu_share.png b/mobile/android/base/resources/drawable-hdpi/ic_menu_share.png index 9243ec26f1c781a43a46c977ac05c6cb804dadd4..9b0ddd5c94b8524b594c81c116d8aeda89c576cf 100644 GIT binary patch literal 2022 zcmbVNdsGu=77rT)4=X4_3q{cB$g;#jlF5TSAfbT-iIQxD2<#SxAsHn=GBFuVcvxFr zDv#FU7Ep?{AdB+SAXQ#2_&`cMLKTsghhkc3LB*iQf@_cL1i{@s$J0M{&YAhX?|%1p zAHRF=nS(OvMn?w^2LgfMC=M4!;%l(=U2cbeW8zoc#g}(5Q7jgP?!XMN4j~AXXd(iL z)$mRv5`mRzyLyoz0)d#MlE-4Pk_fH>Rg+<>4%w*I;%EXPDA=fl6)6Y?BqBRi8Xow# zy%PjfN*)-)lu#wwP$Wqeo~}cp(xq}mdWwRh1cUiNkdccUP$L)&7}cp7J=e$s7wmHJ zy;V#Bfdv&Tg$KS0Dpn!`LQx$8Fv(1R1r=fdEDjlBLJT(K2hgYxokFEkAi6(9<5D?X zhzTq{Anr}4+`)|$hAsNSPdqRQ!?auq#b7Xy4RkW9+ev{q91ev_qtIynxQ4$zO@qNk ze~o_qk_926SLjq)OoeIyt3@~w-Hq`;JknPwsI?NwYr`7-B2hSH6eFyqKx8UKt+wX1 zpsmLuk^hA8Ms2-3O^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ZWOzn|GOyacztEdBXFbfYvm>w;g_9`~2i8n$za?epS+qLS$3oM*@1hl@yUFP`%yyrJu6 zh3mw*fo++&mqusX3Oehkv;UYjS69AppBP==RxqDDcXwr;M@`lkQ}g)F+U3yw&zt_n z00kXFy9{EdM@!#Eip)!F?k0xEoD44CU>^Ul3CvW_&HuT__vndQ+1sBydD+Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*%A z7djXPtk7Wq00MPML_t(&-tCyrYZE~jhM$z$D(xu;K}u^;5ux-Tgdp^w7LisPgP2__q{W@R;xvpqmPV751Za1lLUdU)HWg}+? zfvbA03Ti^v{sA8){vdTTCvjz;Qd>6OZwly-Gj3G*+^tXi2404#-$^vG5sUi|(-a>? zCq5$O@B`ShxPLf|0ZR&C)#CoMzydID)PH9Hwz@!6jP6oRkB;3+T- zyaB!$JF{8fqB{GD%v_W!V8#$|r^8M+B-YPPSA(uVTsyJ@U>R7H%|M>X&zh86JeAl7 zUIEW!JGzClrxLre*_l3-h(%A506P|Anl1yZS)2{M3sgdLxkLf>fY;i&d5QlLM0^tG zLY=X$R4S>VodSLV?+ssNEj|r^_DZ}6?R^aKE>@vH;(e_|7Q|;}1-!&(0>Dqa^8nq% nI}KnX-dO-!@lFB+5fAVm;kbG%02mb<00000NkvXXu0mjfHdsCF diff --git a/mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_back.png b/mobile/android/base/resources/drawable-large-hdpi-v11/ic_menu_back.png new file mode 100644 index 0000000000000000000000000000000000000000..d7303f4d15fe613fb88324fb0b5a256fc083b3f0 GIT binary patch literal 393 zcmV;40e1e0P)wl1oNO^`m{p94kVaI1@l1-3U(mDbSM^R zL`Mlorm0Ya6!cE9WGSd$8uZ_O*)Rpo(o?}j-5xjgos6+xwjTRQ_o7c~Sc05)YaQf# zp6MXx6JG~8--&dP^Q}<_Ip3>wkn_t!2RXmZbdc5SweAVZdEf8&f{0GXV7fHt3zCi# n%q!Kr*HBuEdh|>Sf0?o$dCM7<*(vCP00000NkvXXu0mjfmG7)8 literal 0 HcmV?d00001 diff --git a/mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_back.png b/mobile/android/base/resources/drawable-large-mdpi-v11/ic_menu_back.png new file mode 100644 index 0000000000000000000000000000000000000000..f7f1efd5fa7c520509f3635f2a474c1a5572bc30 GIT binary patch literal 278 zcmV+x0qOpUP)dCvGHu!OwaQ1c8dAj-xoFo!5Rq^yD1@IBJzJ>Y{GL^&XXU<$A}jSSBs zm;x+JEW>r++u=C`Q-Bxa$nZRZDZoP?;%uD^93kG4fy=)GZQPv$E4|4bh;l~Ry2;5% z*Dn%3Xg!E>LdhfW?zcUnXbI@ZAad}EmVk~7Bawnv;N2CH^9jTw8_$5gX|Jew1hf&h csD8T#51b%XljBup%>V!Z07*qoM6N<$f;rc9{{R30 literal 0 HcmV?d00001 diff --git a/mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_back.png b/mobile/android/base/resources/drawable-large-xhdpi-v11/ic_menu_back.png new file mode 100644 index 0000000000000000000000000000000000000000..5fdbb94caced464ff8de1c51ab3b81a566e1f355 GIT binary patch literal 593 zcmV-X048Xmd3ACBS)*6;`i5g;%F z^!78L4LQUznR%Y&>J-xb5pA&uZ6pbtM4!_S}v z!9&1h{89`*g(d_K0Rzh6C((f5Az%~ah73bob`vb}EN#&O6`0B{AX ziikI;w+)a6@mmowfg`p7Qor&j`5uk70ee5pPovp3K6frQhr)m#%bFC>7?>hS474( zKx$W>?C#qKNEs|t7;w)=fYgdy1!stqp8zS1Im8{jKq?7;_GrNjVwq<+V7H9wHQ_Oe fc!;Y1{UF-}dTu_Vjxwg*00000NkvXXu0mjfBB;_PXCqX$K6wQ$=N4e4E2ZP=W zxtWXd!m=-T@?i z6r{9vLxS~aF3Er)cei(BDZ*&D#|;G*MQr0WsXYl)GsOEac!SG|%n6KFpeV14^wOk< zp(uuAoI*9t`q@B`rkzyA#;RCXHP28a>Gu1*6cu!`Y|z7y!2r*C1b>j?GuV)tGDTGa z8NZ6<*TRy5a9b=FFo0-kMoiP%G93^}Xr`7*XgV6G_n>8AQBqV(P;M1yDPJBK%1$5) zhL%JZ8RnE#A|PE1`Jc>b+F$L0Owd6x$hy7QGFJXStPwC6!fKCywM#|>d(hghG(SA7 zj1N%Z%ouPu-aXKVBS=OPCylc!HHwGtcHcR1;IKn}rfec&yPADNewN;WjYibc{7qR$yC3!6 zI{*Di`%@bp*#AOb?k@!ekDZ$-nyqw?Y>qK9~`-mpl7!pDL3wS z&NTV(%SW+s`{j$f6#d?!k&5QpoF_KaTsgS8d)APi{BbsZ_T%zfP5qOxz0SM;d@X09 zcleUH?t{~BtHFNh`q$Ijjy2?e18h6dpOESopL^ZxEsVdn|I*o!eXXYs?HS@dwRvx$ pe|@oem(p;EDf;q`n>F(#rxE2dCvGHu!OwaQ1c8dAj-xoFo!5Rq^yD1@IBJzJ>Y{GL^&XXU<$A}jSSBs zm;x+JEW>r++u=C`Q-Bxa$nZRZDZoP?;%uD^93kG4fy=)GZQPv$E4|4bh;l~Ry2;5% z*Dn%3Xg!E>LdhfW?zcUnXbI@ZAad}EmVk~7Bawnv;N2CH^9jTw8_$5gX|Jew1hf&h csD8T#51b%XljBup%>V!Z07*qoM6N<$f;rc9{{R30 diff --git a/mobile/android/base/resources/drawable-mdpi/ic_menu_share.png b/mobile/android/base/resources/drawable-mdpi/ic_menu_share.png index 8364e3e58e389840c2b4d74a68df83092dfa9e7a..d1629261837d078ca2212f14a36591d63958328e 100644 GIT binary patch literal 1658 zcmbVNeM}Q)7_T}P)`1Rm4$aWZ$y8K&AEmT+qms7QDqup#%g2I>j#>ew(S44JR1_PTdv3ZHe&@FS&c)_j#Y+^YMG0 zCsz;|vCxY@jnCupyuua{(cC)M{d&C1eVd!w61Zh5tBhk~=wvoa%TPR-j!vS0Frzkw zil(%>?2I-lgvT3~s@KG^aq1;FNgD-Pw~oMSG;?SkFC^4z){+K_1(K)~y-5o89zO{J zdYu%E6{%shS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5s=+5iY@ycPh;F&^L_KN+t_Ji&0-00000NkvXXu0mjf DVS%q= diff --git a/mobile/android/base/resources/layout/menu_action_bar.xml b/mobile/android/base/resources/layout/menu_action_bar.xml index 1edd33a5754f..cee0348c1c62 100644 --- a/mobile/android/base/resources/layout/menu_action_bar.xml +++ b/mobile/android/base/resources/layout/menu_action_bar.xml @@ -12,6 +12,4 @@ android:layout_width="@dimen/menu_item_row_width" android:layout_height="@dimen/browser_toolbar_height" android:orientation="horizontal" - android:divider="@drawable/divider_vertical" - android:showDividers="middle" - android:dividerPadding="0dip"/> + android:background="#FFD6DEE4"/> diff --git a/mobile/android/base/resources/layout/menu_item_action_view.xml b/mobile/android/base/resources/layout/menu_item_action_view.xml index 1567b9495870..b2ad760a303e 100644 --- a/mobile/android/base/resources/layout/menu_item_action_view.xml +++ b/mobile/android/base/resources/layout/menu_item_action_view.xml @@ -18,7 +18,7 @@ android:layout_width="0dip" android:layout_height="@dimen/menu_item_row_height" android:layout_weight="1.0" - android:padding="10dip" + android:padding="8dip" android:scaleType="centerInside" android:background="@drawable/action_bar_button" android:layout_gravity="center_vertical" diff --git a/mobile/android/base/resources/layout/menu_popup.xml b/mobile/android/base/resources/layout/menu_popup.xml index 1a2e9a6a6aed..39f4f458c7f0 100644 --- a/mobile/android/base/resources/layout/menu_popup.xml +++ b/mobile/android/base/resources/layout/menu_popup.xml @@ -3,35 +3,14 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + - + - - - - - - - - - + diff --git a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml index 3b8158162146..4e3f516690d8 100644 --- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml +++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml @@ -10,19 +10,24 @@ android:title="@string/reload" android:showAsAction="always"/> + + - - + + diff --git a/mobile/android/base/resources/menu-v11/browser_app_menu.xml b/mobile/android/base/resources/menu-v11/browser_app_menu.xml index bfba76045b17..2eb972f4b993 100644 --- a/mobile/android/base/resources/menu-v11/browser_app_menu.xml +++ b/mobile/android/base/resources/menu-v11/browser_app_menu.xml @@ -5,6 +5,11 @@ + + - - + + diff --git a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml index 5516d8f01e54..c123d3aa6f45 100644 --- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml +++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml @@ -10,6 +10,11 @@ android:title="@string/reload" android:showAsAction="always"/> + + + + diff --git a/mobile/android/base/resources/values-large-v11/styles.xml b/mobile/android/base/resources/values-large-v11/styles.xml index e7c40dfe34ab..950596485e03 100644 --- a/mobile/android/base/resources/values-large-v11/styles.xml +++ b/mobile/android/base/resources/values-large-v11/styles.xml @@ -61,6 +61,14 @@ 0dp + + + + @@ -88,7 +92,7 @@ diff --git a/mobile/android/base/resources/values/themes.xml b/mobile/android/base/resources/values/themes.xml index 148c2e574c5c..c9b01eb6b4d6 100644 --- a/mobile/android/base/resources/values/themes.xml +++ b/mobile/android/base/resources/values/themes.xml @@ -82,6 +82,7 @@ @style/Widget.TopSitesGridView @style/Widget.TopSitesThumbnailView @style/Widget.HomeListView + @style/Widget.GeckoMenuListView @style/Widget.MenuItemDefault @style/Widget.MenuItemActionBar @style/GeckoActionBar.Button diff --git a/mobile/android/base/widget/GeckoPopupMenu.java b/mobile/android/base/widget/GeckoPopupMenu.java index 017c1b0f85b8..47626dddff99 100644 --- a/mobile/android/base/widget/GeckoPopupMenu.java +++ b/mobile/android/base/widget/GeckoPopupMenu.java @@ -137,15 +137,6 @@ public class GeckoPopupMenu implements GeckoMenu.Callback, } } - /** - * Show/hide the arrow pointing to the anchor. - * - * @param show Show/hide the arrow. - */ - public void showArrowToAnchor(boolean show) { - mMenuPopup.showArrowToAnchor(show); - } - @Override public boolean onMenuItemSelected(MenuItem item) { if (mClickListener != null)