From f064a76b61e5bf58e4fbaa1d9a32d88dfd0d473b Mon Sep 17 00:00:00 2001 From: Michael Comella Date: Tue, 3 Feb 2015 16:54:39 -0800 Subject: [PATCH] Bug 1106935 - Move BrowserToolbarTablet menu button right margin hack to xml. r=mhaigh We couldn't do this before because the button declaration was shared by old and new tablet - this is no longer a problem now that old tablet is no longer in use. --HG-- extra : rebase_source : 1e798b1d2c66af5e34d8ddbc14db06d94665f5e7 --- .../resources/layout-large-v11/browser_toolbar.xml | 1 + mobile/android/base/resources/values/dimens.xml | 1 - mobile/android/base/toolbar/BrowserToolbarTablet.java | 11 ----------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml index 57300bd0f753..98412e60378c 100644 --- a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml +++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml @@ -82,6 +82,7 @@ android:id="@+id/menu" style="@style/UrlBar.ImageButton.NewTablet" android:layout_alignParentRight="true" + android:layout_marginRight="6dp" android:contentDescription="@string/menu" android:background="@drawable/new_tablet_action_bar_button" android:visibility="gone"/> diff --git a/mobile/android/base/resources/values/dimens.xml b/mobile/android/base/resources/values/dimens.xml index a8459f60c9a6..c2683cbc707f 100644 --- a/mobile/android/base/resources/values/dimens.xml +++ b/mobile/android/base/resources/values/dimens.xml @@ -38,7 +38,6 @@ 8dp 1dp 60dp - 6dp 56dp 19dp diff --git a/mobile/android/base/toolbar/BrowserToolbarTablet.java b/mobile/android/base/toolbar/BrowserToolbarTablet.java index 1fa78719ccc0..40fe4826ce26 100644 --- a/mobile/android/base/toolbar/BrowserToolbarTablet.java +++ b/mobile/android/base/toolbar/BrowserToolbarTablet.java @@ -10,7 +10,6 @@ import org.mozilla.gecko.animation.PropertyAnimator; import org.mozilla.gecko.animation.ViewHelper; import android.content.Context; -import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.util.AttributeSet; @@ -51,16 +50,6 @@ class BrowserToolbarTablet extends BrowserToolbarTabletBase { setButtonEnabled(forwardButton, true); updateForwardButtonState(ForwardButtonState.HIDDEN); - - setRightMargin(); - } - - private void setRightMargin() { - // TODO: Remove this hack in favor of resources when old tablet is removed. - final Resources res = getContext().getResources(); - final int rightMargin = - res.getDimensionPixelOffset(R.dimen.new_tablet_browser_toolbar_menu_right_margin); - setPadding(getPaddingLeft(), getPaddingTop(), rightMargin, getPaddingBottom()); } private void updateForwardButtonState(final ForwardButtonState state) {