Bug 1176886 - Remove unnecessary parents in sync code. r=nalexander
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 24 Jun 2015 09:28:26 -0700
changeset 250188 b9608f525b1fd218a178eb25cd7b93d83cd35218
parent 250187 aacb3d4718c1240caa23c1d16f90fbb468181c5b
child 250189 5eccb63fdec6c14c91b57eb4636ecf4261151fc1
push id61471
push usercbook@mozilla.com
push dateThu, 25 Jun 2015 09:33:34 +0000
treeherdermozilla-inbound@5b38df79819f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1176886
milestone41.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 1176886 - Remove unnecessary parents in sync code. r=nalexander
mobile/android/base/resources/layout/sync_account.xml
mobile/android/base/resources/layout/sync_redirect_to_setup.xml
mobile/android/base/resources/layout/sync_send_tab.xml
mobile/android/base/resources/layout/sync_setup.xml
mobile/android/base/resources/layout/sync_setup_failure.xml
mobile/android/base/resources/layout/sync_setup_jpake_waiting.xml
mobile/android/base/resources/layout/sync_setup_nointernet.xml
mobile/android/base/resources/layout/sync_setup_pair.xml
mobile/android/base/resources/layout/sync_setup_success.xml
mobile/android/base/resources/values-v11/sync_styles.xml
mobile/android/base/resources/values/sync_styles.xml
--- a/mobile/android/base/resources/layout/sync_account.xml
+++ b/mobile/android/base/resources/layout/sync_account.xml
@@ -1,15 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - 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/. -->
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-  style="@style/SyncContainer" >
+	xmlns:tools="http://schemas.android.com/tools"
+	style="@style/SyncContainer">
 
   <TextView
       style="@style/SyncTop"
       android:text="@string/sync_title_connect" />
 
   <ScrollView
     style="@style/SyncMiddle" >
 
@@ -53,29 +54,27 @@
 	  <TextView android:id="@+id/server_error"
 	    style="@style/SyncTextError"
 	    android:text="@string/sync_invalidserver_label" />
 
 	</LinearLayout>
   </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom" >
-      <Button
-        android:id="@+id/accountCancelButton"
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_cancel" />
+    style="@style/SyncBottom">
+    <Button
+      android:id="@+id/accountCancelButton"
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_cancel"
+		tools:text="Cancel"/>
 
-      <Button
-        style="@style/SyncButton"
-        android:id="@+id/accountConnectButton"
-        android:onClick="connectClickHandler"
-        android:clickable="false"
-        android:enabled="false"
-        android:text="@string/sync_button_connect" />
-    </LinearLayout>
+    <Button
+      style="@style/SyncButton"
+      android:id="@+id/accountConnectButton"
+      android:onClick="connectClickHandler"
+      android:clickable="false"
+      android:enabled="false"
+      android:text="@string/sync_button_connect"
+		tools:text="Connect"/>
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_redirect_to_setup.xml
+++ b/mobile/android/base/resources/layout/sync_redirect_to_setup.xml
@@ -14,25 +14,21 @@
     style="@style/SyncMiddle" >
 
     <TextView
       style="@style/SyncTextItem"
       android:text="@string/sync_text_redirect_to_set_up_sync" />
   </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom" >
+    style="@style/SyncBottom" >
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="redirectToSetupHandler"
-        android:text="@string/sync_button_set_up_sync" />
-      <Button
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_cancel" />
-    </LinearLayout>
+    <Button
+      style="@style/SyncButton"
+      android:onClick="redirectToSetupHandler"
+      android:text="@string/sync_button_set_up_sync" />
+    <Button
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_cancel" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_send_tab.xml
+++ b/mobile/android/base/resources/layout/sync_send_tab.xml
@@ -32,24 +32,20 @@
 
   <ListView
     android:id="@+id/device_list"
     style="@style/SyncMiddle"
     android:padding="0dp" >
   </ListView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom" >
+    style="@style/SyncBottom" >
 
-      <Button
-        style="@style/SyncButton"
-        android:id="@+id/send_button"
-        android:onClick="sendClickHandler"
-        android:clickable="false"
-        android:enabled="false"
-        android:text="@string/sync_button_send" />
-    </LinearLayout>
+    <Button
+      style="@style/SyncButton"
+      android:id="@+id/send_button"
+      android:onClick="sendClickHandler"
+      android:clickable="false"
+      android:enabled="false"
+      android:text="@string/sync_button_send" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_setup.xml
+++ b/mobile/android/base/resources/layout/sync_setup.xml
@@ -77,22 +77,18 @@
         android:onClick="manualClickHandler"
         android:text="@string/sync_link_advancedsetup"
         android:focusable="true"
         android:nextFocusUp="@id/text_pin3" />
     </LinearLayout>
   </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom"
-      android:orientation="horizontal" >
+    style="@style/SyncBottom"
+    android:orientation="horizontal" >
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_cancel" />
-    </LinearLayout>
+    <Button
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_cancel" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_setup_failure.xml
+++ b/mobile/android/base/resources/layout/sync_setup_failure.xml
@@ -22,31 +22,27 @@
 
         <TextView android:id="@+id/failure_subtitle2"
           style="@style/SyncTextItem"
           android:text="@string/sync_subtitle_failmultiple" />
       </LinearLayout>
     </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom" >
+    style="@style/SyncBottom" >
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="tryAgainClickHandler"
-        android:text="@string/sync_button_tryagain" />
+    <Button
+      style="@style/SyncButton"
+      android:onClick="tryAgainClickHandler"
+      android:text="@string/sync_button_tryagain" />
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="manualClickHandler"
-        android:text="@string/sync_button_manual" />
+    <Button
+      style="@style/SyncButton"
+      android:onClick="manualClickHandler"
+      android:text="@string/sync_button_manual" />
 
-       <Button
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_cancel" />
-    </LinearLayout>
+     <Button
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_cancel" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_setup_jpake_waiting.xml
+++ b/mobile/android/base/resources/layout/sync_setup_jpake_waiting.xml
@@ -27,21 +27,17 @@
       <TextView
         style="@style/SyncTextItem"
         android:gravity="center"
         android:text="@string/sync_jpake_subtitle_waiting" />
     </LinearLayout>
   </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer">
-
-    <LinearLayout
-      style="@style/SyncBottom">
+    style="@style/SyncBottom">
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_cancel" />
-    </LinearLayout>
+    <Button
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_cancel" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_setup_nointernet.xml
+++ b/mobile/android/base/resources/layout/sync_setup_nointernet.xml
@@ -15,21 +15,17 @@
 
     <TextView
       style="@style/SyncTextItem"
       android:gravity="center"
       android:text="@string/sync_subtitle_nointernet" />
   </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom" >
+    style="@style/SyncBottom" >
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_ok" />
-    </LinearLayout>
+    <Button
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_ok" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_setup_pair.xml
+++ b/mobile/android/base/resources/layout/sync_setup_pair.xml
@@ -60,30 +60,26 @@
           style="@style/SyncTextError"
           android:text="@string/sync_pair_tryagain"
           android:textSize="10dp" />
       </LinearLayout>
     </LinearLayout>
   </ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
+    style="@style/SyncBottom"
+    android:orientation="horizontal" >
 
-    <LinearLayout
-      style="@style/SyncBottom"
-      android:orientation="horizontal" >
-
-      <Button
-        style="@style/SyncButton"
-        android:onClick="cancelClickHandler"
-        android:text="@string/sync_button_cancel" />
+    <Button
+      style="@style/SyncButton"
+      android:onClick="cancelClickHandler"
+      android:text="@string/sync_button_cancel" />
 
-      <Button
-        android:id="@+id/pair_button_connect"
-        style="@style/SyncButton"
-        android:onClick="connectClickHandler"
-        android:clickable="false"
-        android:enabled="false"
-        android:text="@string/sync_button_connect" />
-    </LinearLayout>
+    <Button
+      android:id="@+id/pair_button_connect"
+      style="@style/SyncButton"
+      android:onClick="connectClickHandler"
+      android:clickable="false"
+      android:enabled="false"
+      android:text="@string/sync_button_connect" />
+  </LinearLayout>
 
-  </LinearLayout>
 </LinearLayout>
--- a/mobile/android/base/resources/layout/sync_setup_success.xml
+++ b/mobile/android/base/resources/layout/sync_setup_success.xml
@@ -18,27 +18,22 @@
 			style="@style/SyncTextItem"
 			android:layout_width="wrap_content"
 			android:layout_height="wrap_content"
 			android:gravity="left"
 			android:text="@string/sync_subtitle_success" />
 	</ScrollView>
 
   <LinearLayout
-    style="@style/SyncBottomContainer" >
-
-    <LinearLayout
-      style="@style/SyncBottom" >
+    style="@style/SyncBottom" >
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="settingsClickHandler"
-        android:text="@string/sync_settings" />
+    <Button
+      style="@style/SyncButton"
+      android:onClick="settingsClickHandler"
+      android:text="@string/sync_settings" />
 
-      <Button
-        style="@style/SyncButton"
-        android:onClick="launchBrowser"
-        android:text="@string/brand_short_name" />
-    </LinearLayout>
-
+    <Button
+      style="@style/SyncButton"
+      android:onClick="launchBrowser"
+      android:text="@string/brand_short_name" />
   </LinearLayout>
 
 </LinearLayout>
--- a/mobile/android/base/resources/values-v11/sync_styles.xml
+++ b/mobile/android/base/resources/values-v11/sync_styles.xml
@@ -11,17 +11,17 @@
     <item name="android:layout_height">wrap_content</item>
     <item name="android:gravity">center_vertical|left</item>
     <item name="android:drawableLeft">@drawable/icon</item>
     <item name="android:padding">4dp</item>
     <item name="android:drawablePadding">4dp</item>
   </style>
 
   <!-- Bottom bar: a horizontal linear layout with buttons in it. -->
-  <style name="SyncBottom" parent="@android:style/Holo.Light.ButtonBar">
+  <style name="SyncBottomBase" parent="@android:style/Holo.Light.ButtonBar">
     <item name="android:layout_width">fill_parent</item>
     <item name="android:layout_height">wrap_content</item>
   </style>
 
   <style name="SyncButton" parent="@android:style/Widget.Holo.Light.Button.Small">
     <item name="android:layout_width">fill_parent</item>
     <item name="android:layout_height">wrap_content</item>
     <item name="android:layout_weight">1</item>
--- a/mobile/android/base/resources/values/sync_styles.xml
+++ b/mobile/android/base/resources/values/sync_styles.xml
@@ -82,27 +82,25 @@
   <style name="SyncMiddle">
     <item name="android:layout_width">fill_parent</item>
     <item name="android:layout_height">0dp</item>
     <item name="android:layout_weight">1</item>
     <item name="android:padding">@dimen/SyncSpace</item>
   </style>
 
   <!-- Bottom bar: a horizontal linear layout with buttons in it. -->
-  <style name="SyncBottom">
+  <style name="SyncBottomBase">
     <item name="android:layout_width">fill_parent</item>
     <item name="android:layout_height">wrap_content</item>
     <item name="android:layout_gravity">center</item>
     <item name="android:gravity">center</item>
     <item name="android:background">@android:drawable/bottom_bar</item>
   </style>
 
-  <style name="SyncBottomContainer">
-    <item name="android:layout_width">match_parent</item>
-    <item name="android:layout_height">wrap_content</item>
+  <style name="SyncBottom" parent="SyncBottomBase">
     <item name="android:divider">@android:drawable/divider_horizontal_bright</item>
     <item name="android:showDividers">beginning</item>
     <item name="android:orientation">vertical</item>
   </style>
 
   <style name="SyncButton" parent="@style/Widget.Button">
     <item name="android:layout_width">fill_parent</item>
     <item name="android:layout_height">wrap_content</item>