Bug 1007442 - Part 2: Make remote tabs panel buttons more consistent across devices. r=lucasr
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 11 Jun 2014 14:31:20 -0700
changeset 188323 1e480afce4b3def0cabfdc9d22f81cc0386683d8
parent 188322 8ef009362d13c3fe164c865d8b9d9766767673b1
child 188324 83be53bc8db94d0ce08fbd52f21974af70457e52
push id26951
push useremorley@mozilla.com
push dateThu, 12 Jun 2014 14:07:43 +0000
treeherdermozilla-central@4f98802de6ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs1007442
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1007442 - Part 2: Make remote tabs panel buttons more consistent across devices. r=lucasr
mobile/android/base/resources/layout/remote_tabs_setup_panel.xml
mobile/android/base/resources/values-land/styles.xml
mobile/android/base/resources/values-large-land-v11/styles.xml
mobile/android/base/resources/values-large-v11/styles.xml
mobile/android/base/resources/values-xlarge-land-v11/styles.xml
mobile/android/base/resources/values-xlarge-v11/styles.xml
mobile/android/base/resources/values/styles.xml
--- a/mobile/android/base/resources/layout/remote_tabs_setup_panel.xml
+++ b/mobile/android/base/resources/layout/remote_tabs_setup_panel.xml
@@ -29,24 +29,29 @@
                      android:text="@string/fxaccount_getting_started_description"/>
 
         </LinearLayout>
 
         <LinearLayout style="@style/RemoteTabsSection"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content">
 
+            <!-- Setting gravity/layout_gravity in portrait is redundant to these elements'
+                 styles, however, it overrides the default left-align behavior in landscape. -->
             <Button android:id="@+id/remote_tabs_setup_get_started"
-                    android:layout_width="wrap_content"
+                    android:layout_gravity="center"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     style="@style/RemoteTabsItem.Button"
                     android:text="@string/fxaccount_getting_started_get_started"
                     android:layout_marginBottom="15dp"/>
 
             <TextView android:id="@+id/remote_tabs_setup_old_sync_link"
+                      android:gravity="center"
+                      android:layout_gravity="center"
                       android:layout_width="match_parent"
                       android:layout_height="wrap_content"
                       style="@style/RemoteTabsItem.TextAppearance.Linkified"
                       android:text="@string/fxaccount_getting_started_old_firefox"/>
 
         </LinearLayout>
 
     </LinearLayout>
--- a/mobile/android/base/resources/values-land/styles.xml
+++ b/mobile/android/base/resources/values-land/styles.xml
@@ -31,18 +31,20 @@
         <item name="android:layout_marginBottom">20dp</item>
         <item name="android:layout_gravity">left</item>
         <item name="android:gravity">left</item>
     </style>
 
     <style name="RemoteTabsItem.Button" parent="RemoteTabsItem.ButtonBase">
         <item name="android:paddingTop">12dp</item>
         <item name="android:paddingBottom">12dp</item>
-        <item name="android:paddingLeft">64dp</item>
-        <item name="android:paddingRight">64dp</item>
+        <item name="android:paddingLeft">6dp</item>
+        <item name="android:paddingRight">6dp</item>
+        <item name="android:layout_marginLeft">24dp</item>
+        <item name="android:layout_marginRight">24dp</item>
     </style>
 
     <style name="RemoteTabsItem.TextAppearance.Header.FXAccounts">
         <item name="android:visibility">gone</item>
     </style>
 
     <style name="RemoteTabsItem.TextAppearance.Linkified.Resend">
         <item name="android:layout_height">match_parent</item>
--- a/mobile/android/base/resources/values-large-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-land-v11/styles.xml
@@ -65,18 +65,20 @@
 
     <style name="RemoteTabsItem" parent="RemoteTabsItemBase">
         <!-- To override the values-land style. -->
     </style>
 
     <style name="RemoteTabsItem.Button" parent="RemoteTabsItem.ButtonBase">
         <item name="android:paddingTop">12dp</item>
         <item name="android:paddingBottom">12dp</item>
-        <item name="android:paddingLeft">36dp</item>
-        <item name="android:paddingRight">36dp</item>
+        <item name="android:paddingLeft">6dp</item>
+        <item name="android:paddingRight">6dp</item>
+        <item name="android:layout_marginLeft">12dp</item>
+        <item name="android:layout_marginRight">12dp</item>
         <item name="android:textSize">16dp</item>
     </style>
 
     <style name="RemoteTabsItem.TextAppearance.Header.FXAccounts">
         <item name="android:visibility">gone</item>
     </style>
 
     <style name="RemoteTabsItem.TextAppearance.Linkified.Resend">
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -88,9 +88,24 @@
         <item name="android:scrollbarStyle">outsideOverlay</item>
     </style>
 
     <style name="Widget.HomeBanner">
         <item name="android:paddingLeft">32dp</item>
         <item name="android:paddingRight">32dp</item>
     </style>
 
+    <!-- Tabs panel -->
+    <style name="RemoteTabsPanelChild" parent="RemoteTabsPanelChildBase">
+        <item name="android:paddingLeft">84dp</item>
+        <item name="android:paddingRight">84dp</item>
+    </style>
+
+    <style name="RemoteTabsItem.Button" parent="RemoteTabsItem.ButtonBase">
+        <item name="android:paddingTop">18dp</item>
+        <item name="android:paddingBottom">18dp</item>
+        <item name="android:paddingLeft">9dp</item>
+        <item name="android:paddingRight">9dp</item>
+        <item name="android:layout_marginLeft">90dp</item>
+        <item name="android:layout_marginRight">90dp</item>
+    </style>
+
 </resources>
--- a/mobile/android/base/resources/values-xlarge-land-v11/styles.xml
+++ b/mobile/android/base/resources/values-xlarge-land-v11/styles.xml
@@ -23,9 +23,20 @@
 
     <style name="Widget.Home.HistoryTabWidget">
         <item name="android:showDividers">beginning|middle|end</item>
         <item name="android:dividerPadding">0dp</item>
         <item name="android:paddingLeft">100dp</item>
         <item name="android:paddingTop">30dp</item>
     </style>
 
+    <!-- Tabs panel -->
+    <style name="RemoteTabsItem.Button" parent="RemoteTabsItem.ButtonBase">
+        <item name="android:paddingTop">12dp</item>
+        <item name="android:paddingBottom">12dp</item>
+        <item name="android:paddingLeft">6dp</item>
+        <item name="android:paddingRight">6dp</item>
+        <item name="android:layout_marginLeft">12dp</item>
+        <item name="android:layout_marginRight">12dp</item>
+        <item name="android:textSize">16dp</item>
+    </style>
+
 </resources>
--- a/mobile/android/base/resources/values-xlarge-v11/styles.xml
+++ b/mobile/android/base/resources/values-xlarge-v11/styles.xml
@@ -25,9 +25,19 @@
     </style>
 
     <style name="Widget.Home.HistoryTabWidget">
         <item name="android:showDividers">beginning|middle|end</item>
         <item name="android:dividerPadding">0dp</item>
         <item name="android:paddingTop">30dp</item>
     </style>
 
+    <!-- Tabs panel -->
+    <style name="RemoteTabsItem.Button" parent="RemoteTabsItem.ButtonBase">
+        <item name="android:paddingTop">18dp</item>
+        <item name="android:paddingBottom">18dp</item>
+        <item name="android:paddingLeft">9dp</item>
+        <item name="android:paddingRight">9dp</item>
+        <item name="android:layout_marginLeft">180dp</item>
+        <item name="android:layout_marginRight">180dp</item>
+    </style>
+
 </resources>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -479,23 +479,26 @@
     <style name="RemoteTabsItem" parent="RemoteTabsItemBase">
         <!-- We set values in landscape. -->
     </style>
 
     <style name="RemoteTabsItem.ButtonBase">
         <item name="android:background">@drawable/remote_tabs_setup_button_background</item>
         <item name="android:textColor">#FFFEFF</item>
         <item name="android:textSize">20sp</item>
+        <item name="android:gravity">center</item>
     </style>
 
     <style name="RemoteTabsItem.Button" parent="RemoteTabsItem.ButtonBase">
         <item name="android:paddingTop">18dp</item>
         <item name="android:paddingBottom">18dp</item>
-        <item name="android:paddingLeft">72dp</item>
-        <item name="android:paddingRight">72dp</item>
+        <item name="android:paddingLeft">9dp</item>
+        <item name="android:paddingRight">9dp</item>
+        <item name="android:layout_marginLeft">24dp</item>
+        <item name="android:layout_marginRight">24dp</item>
     </style>
 
     <style name="RemoteTabsItem.TextAppearance">
         <item name="android:textColor">#C0C9D0</item>
         <item name="android:textSize">16sp</item>
     </style>
 
     <style name="RemoteTabsItem.TextAppearance.Header">