summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJason Monk <jmonk@google.com>2015-02-13 15:23:19 -0500
committerJason Monk <jmonk@google.com>2015-03-25 11:11:36 -0400
commit2ebc8a01696c4e7dd29863b92a15ae0bbbbb254d (patch)
tree8ec8d8ad8b530d01d9aff027abbc992235562ee0 /res
parent5528d8952b0931593e645e1608bf3fe7f46b5ba8 (diff)
downloadpackages_apps_Settings-2ebc8a01696c4e7dd29863b92a15ae0bbbbb254d.zip
packages_apps_Settings-2ebc8a01696c4e7dd29863b92a15ae0bbbbb254d.tar.gz
packages_apps_Settings-2ebc8a01696c4e7dd29863b92a15ae0bbbbb254d.tar.bz2
Allow system apps to add to settings dashboard
Allow system apps to add a tile to the top level of settings that links to an activity through adding a filter for a specific action. Determine the info for the tile based off manifest info for the activity. Also allow the same for managed profiles, but show a dialog in between to select which profile. The category in which the item is to be placed must be in meta-data. The icon and title can be specified through meta-data as well or if unspecified the activity's label and icon will be used. Also added an optional <external-tiles> tag to the dashboard category xml, this allows Settings to put external tiles in the middle of some categories (Personal does this). Bug: 19443117 Change-Id: Idc9938d1549d181103a3030a8784b527215a8399
Diffstat (limited to 'res')
-rw-r--r--res/layout/user_preference.xml4
-rwxr-xr-xres/values/dimens.xml1
-rw-r--r--res/values/donottranslate.xml4
-rw-r--r--res/values/strings.xml3
-rw-r--r--res/xml/dashboard_categories.xml7
5 files changed, 18 insertions, 1 deletions
diff --git a/res/layout/user_preference.xml b/res/layout/user_preference.xml
index 91db846..8e81fec 100644
--- a/res/layout/user_preference.xml
+++ b/res/layout/user_preference.xml
@@ -18,6 +18,8 @@
android:id="@android:id/widget_frame"
android:layout_width="match_parent"
android:layout_height="@dimen/user_spinner_item_height"
+ android:paddingStart="@dimen/user_spinner_padding_sides"
+ android:paddingEnd="@dimen/user_spinner_padding_sides"
android:orientation="horizontal" >
<ImageView
@@ -42,4 +44,4 @@
android:paddingEnd="@dimen/user_spinner_padding"
style="@style/TextAppearance.Medium" />
-</LinearLayout> \ No newline at end of file
+</LinearLayout>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 5ed69c4..580ae22 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -213,6 +213,7 @@
<!-- User spinner -->
<dimen name="user_spinner_height">72dp</dimen>
<dimen name="user_spinner_padding">4dp</dimen>
+ <dimen name="user_spinner_padding_sides">20dp</dimen>
<dimen name="user_spinner_item_height">56dp</dimen>
<!-- CheckBoxPreference -->
diff --git a/res/values/donottranslate.xml b/res/values/donottranslate.xml
index e6bd9a6..611e2b4 100644
--- a/res/values/donottranslate.xml
+++ b/res/values/donottranslate.xml
@@ -33,4 +33,8 @@
<item>@string/input_method_selector_always_show_value</item>
<item>@string/input_method_selector_always_hide_value</item>
</string-array>
+ <string name="category_key_wireless">com.android.settings.category.wireless</string>
+ <string name="category_key_device">com.android.settings.category.device</string>
+ <string name="category_key_personal">com.android.settings.category.personal</string>
+ <string name="category_key_system">com.android.settings.category.system</string>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4c13e4a..c445f77 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -6132,4 +6132,7 @@
<!-- Warning toast shown when data usage screen can't find specified app -->
<string name="unknown_app">Unknown app</string>
+ <!-- Title for profile selection dialog [CHAR LIMIT=30] -->
+ <string name="choose_profile">Choose Profile</string>
+
</resources>
diff --git a/res/xml/dashboard_categories.xml b/res/xml/dashboard_categories.xml
index 01a4f83..0d8c1ac 100644
--- a/res/xml/dashboard_categories.xml
+++ b/res/xml/dashboard_categories.xml
@@ -20,6 +20,7 @@
<!-- WIRELESS and NETWORKS -->
<dashboard-category
android:id="@+id/wireless_section"
+ android:key="@string/category_key_wireless"
android:title="@string/header_category_wireless_networks" >
<!-- Wifi -->
@@ -74,6 +75,7 @@
<!-- DEVICE -->
<dashboard-category
android:id="@+id/device_section"
+ android:key="@string/category_key_device"
android:title="@string/header_category_device" >
<!-- Home -->
@@ -152,6 +154,7 @@
<!-- PERSONAL -->
<dashboard-category
android:id="@+id/personal_section"
+ android:key="@string/category_key_personal"
android:title="@string/header_category_personal" >
<!-- Location -->
@@ -178,6 +181,9 @@
android:icon="@drawable/ic_settings_accounts"
/>
+ <!-- Marker for where to place external tiles in this category -->
+ <external-tiles />
+
<!-- Language -->
<dashboard-tile
android:id="@+id/language_settings"
@@ -199,6 +205,7 @@
<!-- SYSTEM -->
<dashboard-category
android:id="@+id/system_section"
+ android:key="@string/category_key_system"
android:title="@string/header_category_system" >
<!-- Date & Time -->