Fix 3383575: use styled attribs and update layout

This updates the layout to make more room for the button
text in SecuritySettings. The code now uses styled attributes
to make it easier to tweak in the future.

Change-Id: I5fbdf2f6ae4c4c1f9614ab97891f9f2fe6cda628
This commit is contained in:
Jim Miller
2011-01-24 21:25:47 -08:00
parent 323fa9c669
commit a34279fb2a
9 changed files with 40 additions and 82 deletions

View File

@@ -64,26 +64,19 @@
<!-- confirm / restart buttons -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/cancel_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_continue_label"/>
</LinearLayout>

View File

@@ -59,26 +59,19 @@
<!-- confirm / restart buttons -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/footerLeftButton"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_restart_button_text"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/footerRightButton"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_confirm_button_text"/>
</LinearLayout>

View File

@@ -48,26 +48,19 @@
android:textSize="22sp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/skip_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_continue_label"/>
</LinearLayout>

View File

@@ -65,26 +65,19 @@
<!-- confirm / restart buttons -->
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/cancel_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_continue_label"/>
</LinearLayout>

View File

@@ -84,23 +84,16 @@
android:layout_width="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<Button android:id="@+id/cancel_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_cancel_label"/>
<Button android:id="@+id/next_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_continue_label"/>
</LinearLayout>

View File

@@ -54,25 +54,18 @@
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/footerLeftButton"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_restart_button_text"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/footerRightButton"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_confirm_button_text"/>
</LinearLayout>

View File

@@ -47,25 +47,18 @@
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<!-- left / top button: skip, or re-try -->
<Button android:id="@+id/skip_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_cancel_label"/>
<!-- right / bottom button: confirm or ok -->
<Button android:id="@+id/next_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpattern_tutorial_continue_label"/>
</LinearLayout>

View File

@@ -87,23 +87,16 @@
android:layout_width="match_parent">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/SecurityPreferenceButtonContainer"
android:layout_alignParentRight="true"
android:orientation="horizontal">
<Button android:id="@+id/cancel_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_cancel_label"/>
<Button android:id="@+id/next_button"
android:layout_width="140dip"
android:layout_height="wrap_content"
android:ellipsize="marquee"
android:singleLine="true"
style="@style/SecurityPreferenceButton"
android:text="@string/lockpassword_continue_label"/>
</LinearLayout>

View File

@@ -50,7 +50,7 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
</style>
<style name="form_value">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
@@ -78,7 +78,7 @@
<style name="TallTitleBarTheme" parent="android:Theme.NoTitleBar">
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="Theme.CreateShortCut" parent="android:Theme.Holo.DialogWhenLarge">
</style>
@@ -132,4 +132,18 @@
<style name="CryptKeeperAnimation">
<item name="android:windowExitAnimation">@anim/crypt_keeper_exit</item>
</style>
<style name="SecurityPreferenceButtonContainer" parent="@android:style/Holo.SegmentedButton">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:dividerPadding">8dip</item>
</style>
<style name="SecurityPreferenceButton" parent="@android:style/Widget.Holo.Button.Borderless">
<item name="android:layout_width">140dip</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:ellipsize">marquee</item>
<item name="android:singleLine">true</item>
</style>
</resources>