summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-03-31 20:09:34 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-04-04 12:33:59 -0700
commitca18746163621211847a2f184d19a6b3e2b4a1c0 (patch)
tree4dcebc131b550ef51b79248a14fc0c39afff0d8d /res
parent2f54a1625ae031ffbb2a99a00c7b25de3c677828 (diff)
downloadandroid_packages_apps_Trebuchet-ca18746163621211847a2f184d19a6b3e2b4a1c0.tar.gz
android_packages_apps_Trebuchet-ca18746163621211847a2f184d19a6b3e2b4a1c0.tar.bz2
android_packages_apps_Trebuchet-ca18746163621211847a2f184d19a6b3e2b4a1c0.zip
Adding support for dynamically change icon shape for AdaptiveIcons
> This would allow developers to verify their icon designs on different device configurations > This settings is only visible when developer settings is enabled Change-Id: I7e32abfede001c134f23390734dcd39c93b68b9a
Diffstat (limited to 'res')
-rw-r--r--res/values/config.xml20
-rw-r--r--res/values/strings.xml7
-rw-r--r--res/xml/launcher_preferences.xml10
3 files changed, 37 insertions, 0 deletions
diff --git a/res/values/config.xml b/res/values/config.xml
index 745bce3f5..8366d73fc 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -13,6 +13,26 @@
easily override the app name without providing all translations -->
<string name="derived_app_name" translatable="false">@string/app_name</string>
+ <!-- Values for icon shape overrides. These should correspond to entries defined
+ in icon_shape_override_paths_names -->
+ <string-array name="icon_shape_override_paths_values">
+ <item></item>
+ <item>M50,0L100,0 100,100 0,100 0,0z</item>
+ <item>M50,0L80,0 A20,20,0,0 1 100,20 L100,80 A20,20,0,0 1 80,100 L20,100 A20,20,0,0 1 0,80 L 0,20 A20,20,0,0 1 20,0z</item>
+ <item>M50,0 C10,0 0,10 0,50 0,90 10,100 50,100 90,100 100,90 100,50 100,10 90,0 50,0 Z</item>
+ <item>M50 0A50 50,0,1,1,50 100A50 50,0,1,1,50 0</item>
+ <item>M50,0A50,30 0,0,1 100,30V70A50,30 0,0,1 0,70V30A50,30 0,0,1 50,0z</item>
+ </string-array>
+
+ <string-array name="icon_shape_override_paths_names">
+ <!-- Option to not change the icon shape on home screen. [CHAR LIMIT=50] -->
+ <item>@string/icon_shape_no_override</item>
+ <item translatable="false">Square</item>
+ <item translatable="false">Rounded corner rect</item>
+ <item translatable="false">Squircle</item>
+ <item translatable="false">Circle</item>
+ <item translatable="false">Cylinder</item>
+ </string-array>
<!-- DragController -->
<item type="id" name="drag_event_parity" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 99ff581e8..0461e4a02 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -184,6 +184,13 @@
<!-- Text description of the setting that allows the automatic placement of launcher shortcuts for applications and games installed on the device [CHAR LIMIT=NONE] -->
<string name="auto_add_shortcuts_description">For new apps</string>
+ <!-- Developer setting to change the shape of icons on home screen. [CHAR LIMIT=50] -->
+ <string name="icon_shape_override_label">Change icon shape</string>
+ <!-- Option to not change the icon shape on home screen. [CHAR LIMIT=50] -->
+ <string name="icon_shape_no_override">Do not change</string>
+ <!-- Message shown in the progress dialog when the icon shape override is being applied [CHAR LIMIT=100]-->
+ <string name="icon_shape_override_progress">Applying icon shape changes</string>
+
<!-- Label on an icon that references an uninstalled package, for which we have no information about when it might be installed. [CHAR_LIMIT=15] -->
<string name="package_state_unknown">Unknown</string>
diff --git a/res/xml/launcher_preferences.xml b/res/xml/launcher_preferences.xml
index a16583d2c..301bef104 100644
--- a/res/xml/launcher_preferences.xml
+++ b/res/xml/launcher_preferences.xml
@@ -30,4 +30,14 @@
android:defaultValue="true"
android:persistent="true"
/>
+
+ <ListPreference
+ android:key="pref_override_icon_shape"
+ android:title="@string/icon_shape_override_label"
+ android:summary="%s"
+ android:entries="@array/icon_shape_override_paths_names"
+ android:entryValues="@array/icon_shape_override_paths_values"
+ android:defaultValue=""
+ android:persistent="false" />
+
</PreferenceScreen>