Bug 1176886 - Remove unnecessary parents in sync code. r=nalexander

This commit is contained in:
Michael Comella 2015-06-24 09:28:26 -07:00
parent 1aa6a80588
commit f1e32aa120
11 changed files with 96 additions and 132 deletions

View File

@ -4,7 +4,8 @@
- 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"
@ -58,24 +59,22 @@
</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" />
<Button
style="@style/SyncButton"
android:id="@+id/accountConnectButton"
android:onClick="connectClickHandler"
android:clickable="false"
android:enabled="false"
android:text="@string/sync_button_connect" />
</LinearLayout>
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"
tools:text="Connect"/>
</LinearLayout>
</LinearLayout>

View File

@ -19,20 +19,16 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottomContainer" >
<LinearLayout
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>
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>
</LinearLayout>

View File

@ -37,19 +37,15 @@
</ListView>
<LinearLayout
style="@style/SyncBottomContainer" >
<LinearLayout
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>
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>
</LinearLayout>

View File

@ -82,17 +82,13 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottomContainer" >
<LinearLayout
style="@style/SyncBottom"
android:orientation="horizontal" >
<Button
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_cancel" />
</LinearLayout>
style="@style/SyncBottom"
android:orientation="horizontal" >
<Button
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_cancel" />
</LinearLayout>
</LinearLayout>

View File

@ -27,26 +27,22 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottomContainer" >
style="@style/SyncBottom" >
<LinearLayout
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="cancelClickHandler"
android:text="@string/sync_button_cancel" />
</LinearLayout>
<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>
</LinearLayout>

View File

@ -32,16 +32,12 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottomContainer">
<LinearLayout
style="@style/SyncBottom">
<Button
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_cancel" />
</LinearLayout>
style="@style/SyncBottom">
<Button
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_cancel" />
</LinearLayout>
</LinearLayout>

View File

@ -20,16 +20,12 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottomContainer" >
<LinearLayout
style="@style/SyncBottom" >
<Button
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_ok" />
</LinearLayout>
style="@style/SyncBottom" >
<Button
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_ok" />
</LinearLayout>
</LinearLayout>

View File

@ -65,25 +65,21 @@
</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
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
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>
</LinearLayout>

View File

@ -23,22 +23,17 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottomContainer" >
style="@style/SyncBottom" >
<LinearLayout
style="@style/SyncBottom" >
<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="settingsClickHandler"
android:text="@string/sync_settings" />
<Button
style="@style/SyncButton"
android:onClick="launchBrowser"
android:text="@string/brand_short_name" />
</LinearLayout>
</LinearLayout>

View File

@ -16,7 +16,7 @@
</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>

View File

@ -87,7 +87,7 @@
</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>
@ -95,9 +95,7 @@
<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>