diff options
author | Jim Miller <jaggies@google.com> | 2011-05-23 16:44:24 -0700 |
---|---|---|
committer | Jim Miller <jaggies@google.com> | 2011-05-23 17:15:36 -0700 |
commit | d12b95093770f1a71f60f67be9a5e28277b634a1 (patch) | |
tree | 406dca72c0e63e008bbb941eb0c54ffb691171b6 /res | |
parent | 360f060334d3be3dbf13f3af770eb4fcccfddfb2 (diff) | |
download | packages_apps_Settings-d12b95093770f1a71f60f67be9a5e28277b634a1.zip packages_apps_Settings-d12b95093770f1a71f60f67be9a5e28277b634a1.tar.gz packages_apps_Settings-d12b95093770f1a71f60f67be9a5e28277b634a1.tar.bz2 |
Fix 4462497: Make lockscreen preference screen layouts more dynamic
This reduces the dependency of LockScreen preference screens
on a particular device size by using centering logic instead of
absolute offsets/sizes.
Change-Id: I6ff9e71dc122e12493148437dda647820ae0f308
Diffstat (limited to 'res')
-rw-r--r-- | res/layout-sw600dp-land/choose_lock_pattern.xml | 51 | ||||
-rw-r--r-- | res/layout-sw600dp-land/choose_lock_pattern_tutorial.xml | 51 | ||||
-rw-r--r-- | res/layout-sw600dp-land/confirm_lock_pattern.xml | 74 | ||||
-rw-r--r-- | res/layout-sw600dp/choose_lock_pattern.xml | 23 | ||||
-rw-r--r-- | res/layout-sw600dp/choose_lock_pattern_tutorial.xml | 18 | ||||
-rw-r--r-- | res/layout-sw600dp/confirm_lock_pattern.xml | 22 |
6 files changed, 159 insertions, 80 deletions
diff --git a/res/layout-sw600dp-land/choose_lock_pattern.xml b/res/layout-sw600dp-land/choose_lock_pattern.xml index fc5e787..a32a5fb 100644 --- a/res/layout-sw600dp-land/choose_lock_pattern.xml +++ b/res/layout-sw600dp-land/choose_lock_pattern.xml @@ -21,44 +21,41 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + <!-- left side: lock pattern widget --> <RelativeLayout android:layout_width="0dip" android:layout_height="match_parent" - android:layout_weight="1"> + android:layout_weight="1" + android:gravity="center_horizontal|center_vertical" + android:orientation="horizontal"> - <!-- left side: lock pattern --> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" - android:layout_gravity="center_horizontal" - android:layout_marginTop="72dip" - android:layout_marginLeft="111dip" aspect="square"/> - <!-- right side: instructions and buttons --> - <!-- header message --> - <TextView android:id="@+id/headerText" - android:layout_width="542dip" - android:layout_height="78dip" - android:layout_marginTop="88dip" - android:layout_alignParentTop="true" - android:layout_toRightOf="@id/lockPattern" - android:layout_marginLeft="100dip" - android:textSize="22sp"/> + </RelativeLayout> + + <!-- right side: instructions and buttons --> + <RelativeLayout + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center_horizontal"> <!-- footer message --> <TextView android:id="@+id/footerText" - android:layout_width="542dip" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/headerText" android:layout_marginTop="16dip" android:layout_toRightOf="@id/lockPattern" android:layout_marginLeft="100dip" - android:textSize="22sp" + android:textAppearance="?android:attr/textAppearanceLarge" android:visibility="gone"/> <!-- confirm / restart buttons --> - <LinearLayout + <LinearLayout android:id="@+id/buttonContainer" style="@style/SecurityPreferenceButtonContainer" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" @@ -76,6 +73,24 @@ </LinearLayout> + <!-- header message --> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_marginTop="20dip" + android:layout_marginLeft="20dip" + android:layout_above="@id/buttonContainer" + android:gravity="center_vertical|center_horizontal"> + + <TextView android:id="@+id/headerText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge"/> + + </ScrollView> + + </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> diff --git a/res/layout-sw600dp-land/choose_lock_pattern_tutorial.xml b/res/layout-sw600dp-land/choose_lock_pattern_tutorial.xml index 32b452d..1320ba0 100644 --- a/res/layout-sw600dp-land/choose_lock_pattern_tutorial.xml +++ b/res/layout-sw600dp-land/choose_lock_pattern_tutorial.xml @@ -21,33 +21,30 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + <!-- left side: lock pattern example widget --> <RelativeLayout android:layout_width="0dip" android:layout_height="match_parent" - android:layout_weight="1"> + android:layout_weight="1" + android:gravity="center_horizontal|center_vertical" + android:orientation="horizontal"> - <!-- left side: lock pattern --> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" - android:layout_gravity="center_horizontal" - android:layout_marginTop="72dip" - android:layout_marginLeft="111dip" aspect="square"/> - <!-- right side: instructions and buttons --> - <!-- header message --> - <TextView android:id="@+id/headerText" - android:layout_width="542dip" - android:layout_height="wrap_content" - android:layout_marginTop="88dip" - android:layout_alignParentTop="true" - android:layout_toRightOf="@id/lockPattern" - android:layout_marginLeft="100dip" - android:text="@string/lock_intro_message" - android:textSize="22sp"/> + </RelativeLayout> + + <!-- right side: instructions and buttons --> + <RelativeLayout + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center_horizontal"> - <LinearLayout + <!-- navigation buttons --> + <LinearLayout android:id="@+id/buttonContainer" style="@style/SecurityPreferenceButtonContainer" android:layout_alignParentRight="true" android:layout_alignParentBottom="true" @@ -65,7 +62,25 @@ </LinearLayout> - </RelativeLayout> + <!-- header message --> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_marginTop="20dip" + android:layout_marginLeft="20dip" + android:gravity="center_vertical|center_horizontal" + android:layout_above="@id/buttonContainer"> + + <TextView android:id="@+id/headerText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@string/lock_intro_message" + android:textAppearance="?android:attr/textAppearanceLarge"/> + + </ScrollView> + + </RelativeLayout>> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> diff --git a/res/layout-sw600dp-land/confirm_lock_pattern.xml b/res/layout-sw600dp-land/confirm_lock_pattern.xml index 04c3e85..ad08e44 100644 --- a/res/layout-sw600dp-land/confirm_lock_pattern.xml +++ b/res/layout-sw600dp-land/confirm_lock_pattern.xml @@ -13,48 +13,78 @@ See the License for the specific language governing permissions and limitations under the License. --> - <com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient - xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/topLayout" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="match_parent"> + <!-- left side: lock pattern widget --> <RelativeLayout android:layout_width="0dip" android:layout_height="match_parent" - android:layout_weight="1"> + android:layout_weight="1" + android:gravity="center_horizontal|center_vertical" + android:orientation="horizontal"> - <!-- left side: lock pattern --> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" - android:layout_gravity="center_horizontal" - android:layout_marginTop="72dip" - android:layout_marginLeft="111dip" aspect="square"/> - <!-- right side: instructions and buttons --> - <!-- header message --> - <TextView android:id="@+id/headerText" - android:layout_width="542dip" - android:layout_height="wrap_content" - android:layout_marginTop="88dip" - android:layout_alignParentTop="true" - android:layout_toRightOf="@id/lockPattern" - android:layout_marginLeft="100dip" - android:textSize="22sp"/> + </RelativeLayout> + + <!-- right side: instructions and buttons --> + <RelativeLayout + android:layout_width="0dip" + android:layout_height="match_parent" + android:layout_weight="1" + android:gravity="center_horizontal"> + + <!-- confirm / restart buttons --> + <LinearLayout android:id="@+id/buttonContainer" + 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" + style="@style/SecurityPreferenceButton" + android:text="@string/lockpattern_restart_button_text"/> + + <!-- right / bottom button: confirm or ok --> + <Button android:id="@+id/footerRightButton" + style="@style/SecurityPreferenceButton" + android:text="@string/lockpattern_confirm_button_text"/> + + </LinearLayout> <!-- footer message --> <TextView android:id="@+id/footerText" - android:layout_width="542dip" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_below="@id/headerText" + android:layout_above="@id/buttonContainer" android:layout_marginTop="16dip" - android:layout_toRightOf="@id/lockPattern" - android:layout_marginLeft="100dip" - android:textSize="22sp"/> + android:textAppearance="?android:attr/textAppearanceLarge"/> + + <!-- header message --> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true" + android:layout_marginTop="20dip" + android:layout_marginLeft="20dip" + android:layout_above="@id/footerText" + android:gravity="center_vertical|center_horizontal"> + + <TextView android:id="@+id/headerText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textSize="22sp"/> + + </ScrollView> </RelativeLayout> diff --git a/res/layout-sw600dp/choose_lock_pattern.xml b/res/layout-sw600dp/choose_lock_pattern.xml index 6b7b90e..d8f85cc 100644 --- a/res/layout-sw600dp/choose_lock_pattern.xml +++ b/res/layout-sw600dp/choose_lock_pattern.xml @@ -22,19 +22,26 @@ android:gravity="center_horizontal"> <!-- top: instructions and buttons --> + <!-- header message --> - <TextView android:id="@+id/headerText" - android:layout_width="542dip" - android:layout_height="78dip" - android:layout_marginTop="96dip" - android:textSize="22sp"/> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="96dip"> + + <TextView android:id="@+id/headerText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge"/> + + </ScrollView> <!-- footer message --> <TextView android:id="@+id/footerText" - android:layout_width="542dip" - android:layout_height="78dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_marginTop="16dip" - android:textSize="22sp" + android:textAppearance="?android:attr/textAppearanceLarge" android:visibility="gone"/> <!-- bottom: lock pattern --> diff --git a/res/layout-sw600dp/choose_lock_pattern_tutorial.xml b/res/layout-sw600dp/choose_lock_pattern_tutorial.xml index c7bdc88..2a61666 100644 --- a/res/layout-sw600dp/choose_lock_pattern_tutorial.xml +++ b/res/layout-sw600dp/choose_lock_pattern_tutorial.xml @@ -23,12 +23,18 @@ <!-- top: instructions and buttons --> <!-- header message --> - <TextView android:id="@+id/headerText" - android:layout_width="542dip" - android:layout_height="78dip" - android:layout_marginTop="96dip" - android:textSize="22sp" - android:text="@string/lock_intro_message"/> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="96dip"> + + <TextView android:id="@+id/headerText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge" + android:text="@string/lock_intro_message"/> + + </ScrollView> <!-- bottom: lock pattern --> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" diff --git a/res/layout-sw600dp/confirm_lock_pattern.xml b/res/layout-sw600dp/confirm_lock_pattern.xml index 6bffaef..d41525a 100644 --- a/res/layout-sw600dp/confirm_lock_pattern.xml +++ b/res/layout-sw600dp/confirm_lock_pattern.xml @@ -23,18 +23,24 @@ <!-- top: instructions and buttons --> <!-- header message --> - <TextView android:id="@+id/headerText" - android:layout_width="542dip" - android:layout_height="78dip" - android:layout_marginTop="96dip" - android:textSize="22sp"/> + <ScrollView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="96dip"> + + <TextView android:id="@+id/headerText" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textAppearance="?android:attr/textAppearanceLarge"/> + + </ScrollView> <!-- footer message --> <TextView android:id="@+id/footerText" - android:layout_width="542dip" - android:layout_height="78dip" + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:layout_marginTop="16dip" - android:textSize="22sp"/> + android:textAppearance="?android:attr/textAppearanceLarge"/> <!-- bottom: lock pattern --> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" |