Bug 840267 - Use light UI for Sync JPAKE setup. r=rnewman

This commit is contained in:
Wes Johnston 2013-02-22 16:05:36 -08:00
parent 339244b5ba
commit d7e57a1fe3
14 changed files with 175 additions and 90 deletions

View File

@ -479,6 +479,7 @@ RES_VALUES_LAND = \
$(NULL)
RES_VALUES_V11 = \
$(SYNC_RES_VALUES_V11) \
res/values-v11/colors.xml \
res/values-v11/dimens.xml \
res/values-v11/styles.xml \

View File

@ -306,6 +306,10 @@ SYNC_RES_VALUES := \
res/values/sync_styles.xml \
$(NULL)
SYNC_RES_VALUES_V11 := \
res/values-v11/sync_styles.xml \
$(NULL)
SYNC_RES_VALUES_LARGE_V11 := \
res/values-large-v11/sync_styles.xml \
$(NULL)

View File

@ -4,8 +4,8 @@
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#000000" />
<stroke android:width="1dp" android:color="#FFFFFF" />
<solid android:color="#FFF" />
<stroke android:width="1dp" android:color="#000" />
<padding
android:left="1dp"
android:top="1dp"

View File

@ -58,20 +58,25 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottom" >
style="@style/SyncBottomContainer">
<Button
android:id="@+id/accountCancelButton"
style="@style/SyncButton"
android:onClick="cancelClickHandler"
android:text="@string/sync_button_cancel" />
<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>
<Button
style="@style/SyncButton"
android:id="@+id/accountConnectButton"
android:onClick="connectClickHandler"
android:clickable="false"
android:enabled="false"
android:text="@string/sync_button_connect" />
</LinearLayout>
</LinearLayout>

View File

@ -19,15 +19,20 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottom" >
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>
<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,14 +37,18 @@
</ListView>
<LinearLayout
style="@style/SyncBottom" >
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>
<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,12 +82,15 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottom"
android:orientation="horizontal" >
style="@style/SyncBottomContainer">
<LinearLayout 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>

View File

@ -27,21 +27,25 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottom" >
style="@style/SyncBottomContainer">
<LinearLayout
style="@style/SyncBottom" >
<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="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>
</LinearLayout>

View File

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

View File

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

View File

@ -65,20 +65,26 @@
</ScrollView>
<LinearLayout
style="@style/SyncBottom"
android:orientation="horizontal" >
style="@style/SyncBottomContainer">
<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" />
<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>

View File

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

View File

@ -0,0 +1,31 @@
<?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/. -->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Top title bar: a text view with the Sync icon to the left. -->
<style name="SyncTop" parent="@android:style/Widget.Holo.ActionBar">
<item name="android:textAppearance">@android:style/TextAppearance.Holo.Widget.ActionBar.Title</item>
<item name="android:layout_width">fill_parent</item>
<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">
<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>
<item name="android:background">?android:attr/selectableItemBackground</item>
</style>
</resources>

View File

@ -34,7 +34,7 @@
</style>
<style name="SyncLinkItem" parent="@style/SyncTextItem">
<item name="android:clickable">true</item>
<item name="android:textColor">#ACC4D5</item>
<item name="android:textColor">#0000EE</item>
</style>
<style name="SyncTextTitle" parent="@style/SyncTextItem">
<item name="android:layout_gravity">center_vertical</item>
@ -94,6 +94,15 @@
<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>
<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="@android:style/Widget.Button">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
@ -108,7 +117,7 @@
<item name="android:layout_marginBottom">5dp</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/pin_background</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:textColor">#000</item>
<item name="android:textSize">35sp</item>
<item name="android:text">@string/sync_pin_default</item>
</style>