diff options
author | Chris Palmer <palmer@google.com> | 2010-09-13 15:14:55 -0700 |
---|---|---|
committer | Chris Palmer <palmer@google.com> | 2010-09-28 10:32:49 -0700 |
commit | 51794a05ad044ad87efd8291b8decb71a9b5455e (patch) | |
tree | 7b217852dc51abd16a5b280ef411b6cb98934e82 /res/layout | |
parent | 54e21852f221c183eba12e1706650cdc7e0a395f (diff) | |
download | packages_apps_Settings-51794a05ad044ad87efd8291b8decb71a9b5455e.zip packages_apps_Settings-51794a05ad044ad87efd8291b8decb71a9b5455e.tar.gz packages_apps_Settings-51794a05ad044ad87efd8291b8decb71a9b5455e.tar.bz2 |
Improve the add-device-admin layout.
Make it so that the app's explanation comes before the list of possible
policies. This gives the app a chance to explain itself instead of having
the explanation hidden below the fold. To avoid situations in which one
bunch of text items can obscure the other, use an expandable/ellipsizable
TextView with an indicator image. This resolves b/2992594.
Change-Id: I0eb0d0c46bb4be2ec2e019d741915537e1fcc592
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/device_admin_add.xml | 98 |
1 files changed, 61 insertions, 37 deletions
diff --git a/res/layout/device_admin_add.xml b/res/layout/device_admin_add.xml index f560331..f3ba59e 100644 --- a/res/layout/device_admin_add.xml +++ b/res/layout/device_admin_add.xml @@ -20,30 +20,32 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> + + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:background="@*android:drawable/title_bar_medium"> + <TextView android:id="@+id/title" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center" + android:textAppearance="?android:attr/textAppearanceLarge" + android:textColor="?android:attr/textColorPrimary" + android:shadowColor="?android:attr/colorBackground" + android:shadowRadius="2" /> + </LinearLayout> + <ScrollView android:layout_width="match_parent" - android:layout_height="match_parent" - android:layout_weight="1" - android:orientation="vertical"> + android:layout_height="0dip" + android:layout_weight="1.0" + android:gravity="top"> <LinearLayout android:layout_width="match_parent" - android:layout_height="0dp" - android:layout_weight="1" + android:layout_height="wrap_content" android:orientation="vertical"> - <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" - android:background="@*android:drawable/title_bar_medium"> - <TextView android:id="@+id/title" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:gravity="center" - android:textAppearance="?android:attr/textAppearanceLarge" - android:textColor="?android:attr/textColorPrimary" - android:shadowColor="?android:attr/colorBackground" - android:shadowRadius="2" /> - </LinearLayout> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" @@ -66,28 +68,49 @@ android:singleLine="true" android:ellipsize="marquee" /> </LinearLayout> - <TextView android:id="@+id/admin_warning" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:padding="10dip" /> - <LinearLayout android:id="@+id/admin_policies" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:paddingLeft="16dip" - android:paddingRight="12dip" /> - <TextView android:id="@+id/admin_description" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1" - android:padding="10dip" /> - <TextView android:id="@+id/add_msg" + + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_weight="1" - android:padding="10dip" /> + android:orientation="vertical"> + <TextView android:id="@+id/admin_description" + android:layout_width="fill_parent" + android:layout_height="0dip" + android:layout_weight="0" + android:padding="0dip" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="horizontal" + android:gravity="center_vertical"> + <ImageView android:id="@+id/add_msg_expander" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:gravity="center_vertical" /> + <TextView android:id="@+id/add_msg" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:gravity="center_vertical" + android:padding="10dip" /> + </LinearLayout> + + <TextView android:id="@+id/admin_warning" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:padding="10dip" /> + <LinearLayout android:id="@+id/admin_policies" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:orientation="vertical" + android:paddingLeft="16dip" + android:paddingRight="12dip" /> + </LinearLayout> + </LinearLayout> </ScrollView> + <LinearLayout style="@android:style/ButtonBar" android:layout_width="match_parent" android:layout_height="wrap_content" @@ -114,4 +137,5 @@ android:layout_height="0dip" android:layout_weight="1" /> </LinearLayout> + </LinearLayout> |