diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-04-04 19:52:22 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-04-04 19:52:22 +0000 |
commit | 740e90144adb9d4815015378acbff5cc1d8bf398 (patch) | |
tree | c521083cf153609cdfef7588ac4f1454c0340f83 /res | |
parent | 972f20f3e355c8efd45f8044af3b8c45334e54af (diff) | |
parent | ca18746163621211847a2f184d19a6b3e2b4a1c0 (diff) | |
download | android_packages_apps_Trebuchet-740e90144adb9d4815015378acbff5cc1d8bf398.tar.gz android_packages_apps_Trebuchet-740e90144adb9d4815015378acbff5cc1d8bf398.tar.bz2 android_packages_apps_Trebuchet-740e90144adb9d4815015378acbff5cc1d8bf398.zip |
Adding support for dynamically change icon shape for AdaptiveIcons
am: ca18746163
Change-Id: Ic4c14ad1760930735a881926aac8b45efe0cdba0
Diffstat (limited to 'res')
-rw-r--r-- | res/values/config.xml | 20 | ||||
-rw-r--r-- | res/values/strings.xml | 7 | ||||
-rw-r--r-- | res/xml/launcher_preferences.xml | 10 |
3 files changed, 37 insertions, 0 deletions
diff --git a/res/values/config.xml b/res/values/config.xml index 4c19dec22..8b69cb4a4 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> |