diff options
author | Jorge Ruesga <jorge@ruesga.com> | 2015-06-11 02:39:36 +0200 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-12-10 18:23:11 -0800 |
commit | 68c510802aed593bc7bf0526724538c2ef489780 (patch) | |
tree | 5f1e60c0bde95c8fb908e12ee51a2fdbe189b3af /packages/SystemUI/res | |
parent | 699d345030efb8b8d081ea68e000edc19c1a4860 (diff) | |
download | frameworks_base-68c510802aed593bc7bf0526724538c2ef489780.zip frameworks_base-68c510802aed593bc7bf0526724538c2ef489780.tar.gz frameworks_base-68c510802aed593bc7bf0526724538c2ef489780.tar.bz2 |
base: dynamic tiles
Add support for dynamic tiles
Video: https://cloud.ruesga.com/f/71a12e4801/
Required: topic:customtiles_respkg
topic:readd_customtiles
JIRA: CML-22
Change-Id: Ie17ebf09ee88bc0c53561decc27430e174814543
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
Diffstat (limited to 'packages/SystemUI/res')
6 files changed, 183 insertions, 0 deletions
diff --git a/packages/SystemUI/res/drawable/ic_dynamic_qs_adb.xml b/packages/SystemUI/res/drawable/ic_dynamic_qs_adb.xml new file mode 100644 index 0000000..6b33a66 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_dynamic_qs_adb.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2015 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#FFFFFF" + android:pathData="M 37.727707,9.975208 L 40.285946,3.7258741 C 40.541238,3.1009409 +40.243401,2.3882503 39.618464,2.1329586 38.993529,1.8776669 38.28084,2.1755027 +38.025548,2.8004407 L 35.374234,9.275815 C 32.449014,8.605674 28.718028,8.350381 +24.258396,8.350381 l 0,0.01596 0,0 0,-0.01862 c -0.582384,0 -1.148814,0.0053 +-1.707266,0.01596 l -0.0027,0 c -3.712371,0.06116 -6.863631,0.329751 +-9.405913,0.912136 L 10.491243,2.8004407 C 10.235951,2.1755075 +9.5232609,1.8776669 8.8983273,2.1329586 8.2733938,2.3882503 7.9755532,3.1009409 +8.2308452,3.7258741 L 10.789084,9.975208 c -3.3959157,1.284439 +-5.1989153,3.45708 -5.1989153,6.94607 l 0,7.31837 0,1.898735 0,2.084884 c +0,6.411552 6.0738233,8.379428 16.9583033,8.557599 l 0,0.01064 0.67546,0 c +0.340389,0.0027 0.686097,0.0053 1.034464,0.0053 l 0,-0.0053 0,0 0,0.0053 c +0.348368,0 0.694075,-0.0027 1.034465,-0.0053 l 0.04786,0 c 11.280713,-0.11169 +17.585893,-2.031699 17.585893,-8.565578 l 0,-2.087543 0,-1.898735 0,-7.31837 C +42.929314,13.429631 41.123615,11.259649 37.7277,9.975211 Z M 14.661013,27.973293 +c -3.084777,0 -5.5845131,-2.499733 -5.5845131,-5.584512 0,-3.084778 +2.4997361,-5.584511 5.5845131,-5.584511 3.084778,0 5.584512,2.499733 +5.584512,5.584511 0,3.084779 -2.499734,5.584512 -5.584512,5.584512 z m +10.185086,4.050102 -1.178065,0 c -0.86693,0 -1.571642,-0.702054 +-1.571642,-1.571642 0,-0.03192 0.008,-0.06382 0.01064,-0.09573 l 4.300073,0 c +0.0027,0.03192 0.01064,0.06116 0.01064,0.09573 0,0.869588 -0.704712,1.571642 +-1.571641,1.571642 z m 9.00968,-4.050102 c -3.084778,0 -5.584512,-2.499733 +-5.584512,-5.584512 0,-3.084778 2.499734,-5.584511 5.584512,-5.584511 3.084777,0 +5.584512,2.499733 5.584512,5.584511 -0.0027,3.084779 -2.502394,5.584512 +-5.584512,5.584512 z" /> + <path + android:fillColor="#FFFFFF" + android:strokeWidth="16" + android:strokeLineJoin="round" + android:strokeLineCap="round" + android:pathData="M 23.2448199 33.152538 L 24.8907709 33.152538 Q 25.9999988 33.152538 +25.9999988 34.2617659 L 25.9999988 44.6534791 Q 25.9999988 45.762707 24.8907709 45.762707 +L 23.2448199 45.762707 Q 22.135592 45.762707 22.135592 44.6534791 L 22.135592 34.2617659 +Q 22.135592 33.152538 23.2448199 33.152538 Z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_dynamic_qs_ime_selector.xml b/packages/SystemUI/res/drawable/ic_dynamic_qs_ime_selector.xml new file mode 100644 index 0000000..07ee10a --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_dynamic_qs_ime_selector.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2015 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#FFFFFF" + android:pathData="M40 10H8c-2.21 0-3.98 1.79-3.98 4L4 34c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 +4-4V14c0-2.21-1.79-4-4-4zm-18 6h4v4h-4v-4zm0 6h4v4h-4v-4zm-6-6h4v4h-4v-4zm0 +6h4v4h-4v-4zm-2 4h-4v-4h4v4zm0-6h-4v-4h4v4zm18 +14H16v-4h16v4zm0-8h-4v-4h4v4zm0-6h-4v-4h4v4zm6 6h-4v-4h4v4zm0-6h-4v-4h4v4z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_dynamic_qs_next_alarm.xml b/packages/SystemUI/res/drawable/ic_dynamic_qs_next_alarm.xml new file mode 100644 index 0000000..184d407 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_dynamic_qs_next_alarm.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2015 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#FFFFFF" + android:pathData="M44 11.44l-9.19-7.71-2.57 3.06 9.19 7.71L44 11.44zM15.76 6.78l-2.57-3.06L4 +11.43l2.57 3.06 9.19-7.71zM25 16h-3v12l9.49 5.71L33 +31.24l-8-4.74V16zm-1.01-8C14.04 8 6 16.06 6 26s8.04 18 17.99 18S42 35.94 42 26 +33.94 8 23.99 8zM24 40c-7.73 0-14-6.27-14-14s6.27-14 14-14 14 6.27 14 14-6.26 +14-14 14z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/drawable/ic_dynamic_qs_su.xml b/packages/SystemUI/res/drawable/ic_dynamic_qs_su.xml new file mode 100644 index 0000000..5d582d2 --- /dev/null +++ b/packages/SystemUI/res/drawable/ic_dynamic_qs_su.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +Copyright (C) 2015 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:width="48dp" + android:height="48dp" + android:viewportWidth="48" + android:viewportHeight="48"> + + <path + android:fillColor="#FFFFFF" + android:strokeWidth="1" + android:pathData="M 28.79,43.78 L 22.26,43.78 31.33,3.52 37.88,3.52 Z" /> + <path + android:fillColor="#FFFFFF" + android:strokeWidth="1" + android:pathData="M 15.46,43.78 L 8.54,43.78 17.69,3.52 24.41,3.52 Z" /> + <path + android:fillColor="#FFFFFF" + android:strokeWidth="1" + android:pathData="M 7.53,15.86 L 43.53,15.86 43.53,20.34 7.53,20.34 Z" /> + <path + android:fillColor="#FFFFFF" + android:strokeWidth="1" + android:pathData="M 4.68,28.68 L 41.69,28.68 41.69,33.15 4.68,33.15 Z" /> +</vector>
\ No newline at end of file diff --git a/packages/SystemUI/res/values/cm_arrays.xml b/packages/SystemUI/res/values/cm_arrays.xml index 9bd31f0..687ab30 100644 --- a/packages/SystemUI/res/values/cm_arrays.xml +++ b/packages/SystemUI/res/values/cm_arrays.xml @@ -54,4 +54,24 @@ <item>@string/accessibility_quick_settings_perf_profile_changed_bias_perf</item> <item>@string/accessibility_quick_settings_perf_profile_changed_perf</item> </string-array> + + <!-- Dynamic tiles --> + <string-array name="dynamic_qs_tiles_labels" translatable="false"> + <item>@string/dynamic_qs_tile_next_alarm_label</item> + <item>@string/dynamic_qs_tile_ime_selector_label</item> + <item>@string/dynamic_qs_tile_su_label</item> + <item>@string/dynamic_qs_tile_adb_label</item> + </string-array> + <string-array name="dynamic_qs_tiles_icons_resources_ids" translatable="false"> + <item>ic_dynamic_qs_next_alarm</item> + <item>ic_dynamic_qs_ime_selector</item> + <item>ic_dynamic_qs_su</item> + <item>ic_dynamic_qs_adb</item> + </string-array> + <string-array name="dynamic_qs_tiles_values" translatable="false"> + <item>next_alarm</item> + <item>ime_selector</item> + <item>su</item> + <item>adb</item> + </string-array> </resources> diff --git a/packages/SystemUI/res/values/cm_strings.xml b/packages/SystemUI/res/values/cm_strings.xml index 03b9a47..03fc080 100644 --- a/packages/SystemUI/res/values/cm_strings.xml +++ b/packages/SystemUI/res/values/cm_strings.xml @@ -153,4 +153,11 @@ <!-- Announcement made when the battery mode tile changes to quick (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_quick_settings_perf_profile_changed_bias_perf">Battery mode changed to quick mode.</string> <string name="quick_settings_performance_profile_detail_title">Battery mode</string> + + <!-- Dynamic tiles --> + <string name="quick_settings_dynamic_tile_detail_title">Dynamic tile</string> + <string name="dynamic_qs_tile_next_alarm_label">Next alarm</string> + <string name="dynamic_qs_tile_ime_selector_label">IME selector</string> + <string name="dynamic_qs_tile_su_label">Root</string> + <string name="dynamic_qs_tile_adb_label" translatable="false">ADB</string> </resources> |