Bug 1007442 - Part 2: Make remote tabs panel buttons more consistent across devices. r=lucasr, a=lmandel
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 11 Jun 2014 14:31:20 -0700
changeset 208237 3b319d395f50612b8f1dbac6b3f53af4056e2c3f
parent 208236 44ef5ff8a390466dfdf87cee2eb7ab7fc0e84f75
child 208238 71f5fa1512d20a1b94c6cdc779df38ef61d28c50
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr, lmandel
bugs1007442
milestone32.0a2
Bug 1007442 - Part 2: Make remote tabs panel buttons more consistent across devices. r=lucasr, a=lmandel
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">