summaryrefslogtreecommitdiffstats
path: root/res/layout-sw600dp-land
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2011-05-23 16:44:24 -0700
committerJim Miller <jaggies@google.com>2011-05-23 17:15:36 -0700
commitd12b95093770f1a71f60f67be9a5e28277b634a1 (patch)
tree406dca72c0e63e008bbb941eb0c54ffb691171b6 /res/layout-sw600dp-land
parent360f060334d3be3dbf13f3af770eb4fcccfddfb2 (diff)
downloadpackages_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/layout-sw600dp-land')
-rw-r--r--res/layout-sw600dp-land/choose_lock_pattern.xml51
-rw-r--r--res/layout-sw600dp-land/choose_lock_pattern_tutorial.xml51
-rw-r--r--res/layout-sw600dp-land/confirm_lock_pattern.xml74
3 files changed, 118 insertions, 58 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>