summaryrefslogtreecommitdiffstats
path: root/packages/BackupRestoreConfirmation
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-08-03 17:29:53 -0700
committerChristopher Tate <ctate@google.com>2011-08-03 17:31:52 -0700
commit31deacf6f59be3633a4bcdb9359b2f9f750de527 (patch)
tree4d843cbe6114531b02e0406a147d88e90d7b189c /packages/BackupRestoreConfirmation
parent9a3cf8c634c23907964041190bd5aaed4d437461 (diff)
downloadframeworks_base-31deacf6f59be3633a4bcdb9359b2f9f750de527.zip
frameworks_base-31deacf6f59be3633a4bcdb9359b2f9f750de527.tar.gz
frameworks_base-31deacf6f59be3633a4bcdb9359b2f9f750de527.tar.bz2
Make backup/restore confirmation UI landscape-friendly
Now the textual content and password fields are placed in scroll view, and the confirm/deny buttons pinned at the bottom of the layout. Previously, in landscape mode on some devices the buttons would be pushed off screen. Bug 5115411 Change-Id: I8bf8fd1516735bf6111893df79636b519dbfb803
Diffstat (limited to 'packages/BackupRestoreConfirmation')
-rw-r--r--packages/BackupRestoreConfirmation/res/layout/confirm_backup.xml33
-rw-r--r--packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml125
2 files changed, 100 insertions, 58 deletions
diff --git a/packages/BackupRestoreConfirmation/res/layout/confirm_backup.xml b/packages/BackupRestoreConfirmation/res/layout/confirm_backup.xml
index 3668b8c..7dfa53e 100644
--- a/packages/BackupRestoreConfirmation/res/layout/confirm_backup.xml
+++ b/packages/BackupRestoreConfirmation/res/layout/confirm_backup.xml
@@ -18,10 +18,20 @@
*/
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="16dp" >
+
+ <ScrollView
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:layout_width="match_parent">
+ <LinearLayout
+ android:orientation="vertical"
android:layout_height="wrap_content"
- android:padding="16dp" >
+ android:layout_width="match_parent">
<TextView android:id="@+id/confirm_text"
android:layout_width="match_parent"
@@ -63,13 +73,21 @@
android:layout_marginLeft="30dp"
android:layout_below="@id/enc_password"
android:layout_marginBottom="30dp" />
+ </LinearLayout>
+ </ScrollView>
+
+ <LinearLayout android:orientation="horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_gravity="bottom">
<Button android:id="@+id/button_allow"
android:filterTouchesWhenObscured="true"
android:text="@string/allow_backup_button_label"
android:layout_below="@id/package_name"
android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
+ android:layout_width="0dp"
+ android:layout_weight="1" />
<Button android:id="@+id/button_deny"
android:text="@string/deny_backup_button_label"
@@ -77,6 +95,9 @@
android:layout_toRightOf="@id/button_allow"
android:layout_alignTop="@id/button_allow"
android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
+ android:layout_width="0dp"
+ android:layout_weight="1" />
+
+ </LinearLayout>
-</RelativeLayout>
+</LinearLayout>
diff --git a/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml b/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml
index 38fcc49..4927cbb 100644
--- a/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml
+++ b/packages/BackupRestoreConfirmation/res/layout/confirm_restore.xml
@@ -18,65 +18,86 @@
*/
-->
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:padding="16dp" >
+
+ <ScrollView
+ android:layout_height="0dp"
+ android:layout_weight="1"
+ android:layout_width="match_parent">
+ <LinearLayout
+ android:orientation="vertical"
android:layout_height="wrap_content"
- android:padding="16dp" >
+ android:layout_width="match_parent">
- <TextView android:id="@+id/confirm_text"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="30dp"
- android:text="@string/restore_confirm_text" />
+ <TextView android:id="@+id/confirm_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="30dp"
+ android:text="@string/restore_confirm_text" />
+
+ <TextView android:id="@+id/password_desc"
+ android:layout_below="@id/confirm_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="10dp"
+ android:text="@string/current_password_text" />
- <TextView android:id="@+id/password_desc"
- android:layout_below="@id/confirm_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="10dp"
- android:text="@string/current_password_text" />
+ <EditText android:id="@+id/password"
+ android:layout_below="@id/password_desc"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="30dp"
+ android:password="true" />
- <EditText android:id="@+id/password"
- android:layout_below="@id/password_desc"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="30dp"
- android:password="true" />
+ <TextView android:id="@+id/enc_password_desc"
+ android:layout_below="@id/password"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="10dp"
+ android:text="@string/restore_enc_password_text" />
- <TextView android:id="@+id/enc_password_desc"
- android:layout_below="@id/password"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="10dp"
- android:text="@string/restore_enc_password_text" />
+ <EditText android:id="@+id/enc_password"
+ android:layout_below="@id/enc_password_desc"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="30dp"
+ android:password="true" />
- <EditText android:id="@+id/enc_password"
- android:layout_below="@id/enc_password_desc"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginBottom="30dp"
- android:password="true" />
+ <TextView android:id="@+id/package_name"
+ android:layout_width="match_parent"
+ android:layout_height="20dp"
+ android:layout_marginLeft="30dp"
+ android:layout_below="@id/enc_password"
+ android:layout_marginBottom="10dp" />
+ </LinearLayout>
+ </ScrollView>
- <TextView android:id="@+id/package_name"
- android:layout_width="match_parent"
- android:layout_height="20dp"
- android:layout_marginLeft="30dp"
- android:layout_below="@id/enc_password"
- android:layout_marginBottom="30dp" />
+ <LinearLayout android:orientation="horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="match_parent"
+ android:layout_gravity="bottom">
- <Button android:id="@+id/button_allow"
- android:filterTouchesWhenObscured="true"
- android:text="@string/allow_restore_button_label"
- android:layout_below="@id/package_name"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
+ <Button android:id="@+id/button_allow"
+ android:filterTouchesWhenObscured="true"
+ android:text="@string/allow_restore_button_label"
+ android:layout_below="@id/package_name"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1" />
+
+ <Button android:id="@+id/button_deny"
+ android:text="@string/deny_restore_button_label"
+ android:layout_below="@id/package_name"
+ android:layout_toRightOf="@id/button_allow"
+ android:layout_alignTop="@id/button_allow"
+ android:layout_height="wrap_content"
+ android:layout_width="0dp"
+ android:layout_weight="1" />
- <Button android:id="@+id/button_deny"
- android:text="@string/deny_restore_button_label"
- android:layout_below="@id/package_name"
- android:layout_toRightOf="@id/button_allow"
- android:layout_alignTop="@id/button_allow"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content" />
+ </LinearLayout>
-</RelativeLayout>
+</LinearLayout>