summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-01-27 16:22:05 -0800
committerDianne Hackborn <hackbod@google.com>2010-01-27 17:27:17 -0800
commit61daf83ca8bcf1353e0e81316a2b3809ec7397c5 (patch)
tree8884a8cce3e954f2a68ba957b7e296d3130fdc3e /res
parent9e0135fd452162382e3f637d4f24073d1c408abf (diff)
downloadpackages_apps_settings-61daf83ca8bcf1353e0e81316a2b3809ec7397c5.zip
packages_apps_settings-61daf83ca8bcf1353e0e81316a2b3809ec7397c5.tar.gz
packages_apps_settings-61daf83ca8bcf1353e0e81316a2b3809ec7397c5.tar.bz2
Update settings UI to support multiple device admins.
Diffstat (limited to 'res')
-rw-r--r--res/layout/device_admin_add.xml16
-rw-r--r--res/layout/device_admin_item.xml56
-rw-r--r--res/layout/device_admin_settings.xml120
-rw-r--r--res/values/strings.xml14
4 files changed, 84 insertions, 122 deletions
diff --git a/res/layout/device_admin_add.xml b/res/layout/device_admin_add.xml
index 4845fca..3ff190b 100644
--- a/res/layout/device_admin_add.xml
+++ b/res/layout/device_admin_add.xml
@@ -35,10 +35,9 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@*android:drawable/title_bar_medium">
- <TextView
+ <TextView android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:text="@string/add_device_admin_msg"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="?android:attr/textColorPrimary"
@@ -49,14 +48,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
- <ImageView android:id="@+id/active_icon"
+ <ImageView android:id="@+id/admin_icon"
android:layout_width="@android:dimen/app_icon_size"
android:layout_height="@android:dimen/app_icon_size"
android:layout_marginLeft="5dip"
android:layout_marginRight="11dip"
android:layout_gravity="center_vertical"
android:scaleType="fitCenter"/>
- <TextView android:id="@+id/active_name"
+ <TextView android:id="@+id/admin_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -67,7 +66,7 @@
android:singleLine="true"
android:ellipsize="marquee" />
</LinearLayout>
- <TextView android:id="@+id/active_warning"
+ <TextView android:id="@+id/admin_warning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip" />
@@ -77,7 +76,7 @@
android:orientation="vertical"
android:paddingLeft="16dip"
android:paddingRight="12dip" />
- <TextView android:id="@+id/active_description"
+ <TextView android:id="@+id/admin_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
@@ -97,11 +96,10 @@
android:layout_width="0dip"
android:layout_height="0dip"
android:layout_weight="1" />
- <Button android:id="@+id/add_button"
+ <Button android:id="@+id/action_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/add_device_admin" />
+ android:layout_weight="1" />
<View
android:layout_width="0dip"
android:layout_height="0dip"
diff --git a/res/layout/device_admin_item.xml b/res/layout/device_admin_item.xml
index d17ff24..49cbc61 100644
--- a/res/layout/device_admin_item.xml
+++ b/res/layout/device_admin_item.xml
@@ -21,27 +21,49 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
- android:orientation="horizontal"
+ android:orientation="vertical"
android:paddingRight="6dip"
android:paddingLeft="6dip"
android:gravity="fill" >
- <ImageView android:id="@+id/icon"
- android:layout_width="@android:dimen/app_icon_size"
- android:layout_height="@android:dimen/app_icon_size"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="11dip"
- android:layout_gravity="center_vertical"
- android:scaleType="fitCenter"/>
-
- <TextView android:id="@+id/name"
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+
+ <ImageView android:id="@+id/icon"
+ android:layout_width="@android:dimen/app_icon_size"
+ android:layout_height="@android:dimen/app_icon_size"
+ android:layout_marginLeft="5dip"
+ android:layout_marginRight="11dip"
+ android:layout_gravity="center_vertical"
+ android:scaleType="fitCenter"/>
+
+ <TextView android:id="@+id/name"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:textAppearance="?android:attr/textAppearanceMedium"
+ android:textStyle="bold"
+ android:singleLine="true"
+ android:ellipsize="marquee"
+ android:layout_marginBottom="2dip" />
+
+ <CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/checkbox"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
+ android:focusable="false"
+ android:clickable="false" />
+ </LinearLayout>
+
+ <TextView android:id="@+id/description"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="center_vertical"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold"
+ android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
- android:ellipsize="marquee"
- android:layout_marginBottom="2dip" />
+ android:ellipsize="end" />
+
</LinearLayout>
diff --git a/res/layout/device_admin_settings.xml b/res/layout/device_admin_settings.xml
index 40b20e6..eaf42fe 100644
--- a/res/layout/device_admin_settings.xml
+++ b/res/layout/device_admin_settings.xml
@@ -14,105 +14,41 @@
limitations under the License.
-->
-<FrameLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent"
+ android:orientation="vertical">
<LinearLayout
- android:id="@+id/active_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:visibility="gone">
- <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:background="@*android:drawable/title_bar_medium">
+ <TextView
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@*android:drawable/title_bar_medium">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:text="@string/active_device_admin_msg"
- 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"
- android:orientation="horizontal">
- <ImageView android:id="@+id/active_icon"
- android:layout_width="@android:dimen/app_icon_size"
- android:layout_height="@android:dimen/app_icon_size"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="11dip"
- android:layout_gravity="center_vertical"
- android:scaleType="fitCenter"/>
- <TextView android:id="@+id/active_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_marginBottom="2dip"
- android:layout_gravity="center_vertical"
- android:textAppearance="?android:attr/textAppearanceMedium"
- android:textStyle="bold"
- android:singleLine="true"
- android:ellipsize="marquee" />
- </LinearLayout>
- <TextView android:id="@+id/active_description"
+ android:layout_height="match_parent"
+ android:text="@string/select_device_admin_msg"
+ android:gravity="center"
+ android:textAppearance="?android:attr/textAppearanceLarge"
+ android:textColor="?android:attr/textColorPrimary"
+ android:shadowColor="?android:attr/colorBackground"
+ android:shadowRadius="2" />
+ </LinearLayout>
+ <FrameLayout
android:layout_width="match_parent"
- android:layout_height="wrap_content"
+ android:layout_height="0px"
android:layout_weight="1"
- android:padding="10dip" />
- <LinearLayout style="@android:style/ButtonBar"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal">
- <View
- android:layout_width="0dip"
- android:layout_height="0dip"
- android:layout_weight="1" />
- <Button android:id="@+id/remove_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:text="@string/remove_device_admin" />
- <View
- android:layout_width="0dip"
- android:layout_height="0dip"
- android:layout_weight="1" />
- </LinearLayout>
- </LinearLayout>
-
- <LinearLayout
- android:id="@+id/select_layout"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical"
- android:visibility="gone">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:background="@*android:drawable/title_bar_medium">
- <TextView
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:text="@string/select_device_admin_msg"
- android:gravity="center"
- android:textAppearance="?android:attr/textAppearanceLarge"
- android:textColor="?android:attr/textColorPrimary"
- android:shadowColor="?android:attr/colorBackground"
- android:shadowRadius="2" />
- </LinearLayout>
+ android:paddingTop="10dip"
+ android:paddingBottom="10dip">
<ListView android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingTop="10dip"
- android:paddingBottom="10dip"
android:drawSelectorOnTop="false"
android:fastScrollEnabled="true" />
- </LinearLayout>
-</FrameLayout>
+ <TextView android:id="@android:id/empty"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:text="@string/no_device_admins"
+ android:textAppearance="?android:attr/textAppearanceLarge" />
+ </FrameLayout>
+</LinearLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 98a24e8..ede0eaa 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2347,22 +2347,28 @@ found in the list of installed applications.</string>
<!-- Device admin settings activity title -->
<string name="device_admin_settings_title">Device administration settings</string>
<!-- Label for screen showing the active device policy -->
- <string name="active_device_admin_msg">Active device administrator</string>
+ <string name="active_device_admin_msg">Device administrator</string>
<!-- Label for button to remove the active device admin -->
<string name="remove_device_admin">Deactivate</string>
<!-- Label for screen showing to select device policy -->
- <string name="select_device_admin_msg">Select device administrator</string>
+ <string name="select_device_admin_msg">Device administrators</string>
+ <!-- Message when there are no available device admins to display -->
+ <string name="no_device_admins">No available device administrators</string>
<!-- Label for screen showing to add device policy -->
- <string name="add_device_admin_msg">Activate device administrator</string>
+ <string name="add_device_admin_msg">Activate device administrator?</string>
<!-- Label for button to set the active device admin -->
<string name="add_device_admin">Activate</string>
<!-- Device admin add activity title -->
- <string name="device_admin_add_title">Activate device administrator</string>
+ <string name="device_admin_add_title">Device administrator</string>
<!-- Device admin warning message about policies an admin can use -->
<string name="device_admin_warning">Activating this administrator will allow
the application <xliff:g id="app_name">%1$s</xliff:g> to perform the
following operations:</string>
+ <!-- Device admin warning message about policies an admin can use -->
+ <string name="device_admin_status">This administrator is active and allows
+ the application <xliff:g id="app_name">%1$s</xliff:g> to perform the
+ following operations:</string>
<!-- Name to assign to a Network Access Point that was saved without a name -->
<string name="untitled_apn">Untitled</string>