summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMac Young <youngmac@google.com>2022-04-01 18:55:19 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-01 18:55:19 +0000
commitb9b43e29dcaa2f61ecd1a3552f1da0c9a56f8313 (patch)
tree6ca579aadafaab45962522bc6742e002a0d582be
parent721d95ee5e705e5305c27b666165ffaf26321464 (diff)
parent9e4c9485fdca70a325042d2c3b9cde10a45d097f (diff)
downloadsystemlibs-android13-mainline-wifi-release.tar.gz
Merge 'Adjust Button Toggle UI component according to UX reference spec' into tm-dev am: 9e4c9485fdaml_wif_331910020aml_wif_331810010aml_wif_331710030aml_wif_331613000aml_wif_331511020aml_wif_331414000aml_wif_331310070aml_wif_331112000aml_wif_331016070aml_wif_330910030aml_wif_330810040aml_tz4_332714070aml_tz4_332714050aml_tz4_332714010aml_tz4_331910000aml_tz4_331314030aml_tz4_331314020aml_tz4_331314010aml_tz4_331012050aml_tz4_331012040aml_tz4_331012000aml_tet_331910040aml_tet_331820050aml_tet_331711040aml_tet_331511160aml_tet_331511000aml_tet_331412030aml_tet_331312080aml_tet_331117000aml_tet_331012080aml_tet_330911010aml_tet_330812150aml_swc_331911000aml_swc_331712000aml_swc_331612000aml_swc_331511000aml_swc_331410000aml_swc_331318000aml_swc_331116000aml_swc_331012020aml_sta_331910000aml_sta_331811000aml_sta_331711010aml_sta_331610000aml_sta_331511000aml_sta_331410000aml_sta_331311000aml_sta_331010010aml_sta_330910000aml_sdk_331812000aml_sdk_331811100aml_sdk_331811000aml_sdk_331412000aml_sdk_331410000aml_sdk_331310010aml_sdk_331111000aml_sdk_330810050aml_sdk_330810010aml_sch_331113000aml_sch_331111000aml_res_331820000aml_res_331611010aml_res_331512000aml_res_331314010aml_res_331114000aml_res_331011050aml_res_330910000aml_res_330810000aml_per_331913010aml_per_331812030aml_per_331710050aml_per_331611010aml_per_331512020aml_per_331411000aml_per_331313010aml_per_331115020aml_per_331019040aml_per_330912010aml_per_330811030aml_neu_331310000aml_neu_331113000aml_net_331910030aml_net_331812010aml_net_331710000aml_net_331610000aml_net_331412000aml_net_331313030aml_net_331313010aml_net_331110020aml_net_331011030aml_net_330910010aml_net_330811010aml_mpr_331918000aml_mpr_331812020aml_mpr_331711020aml_mpr_331613010aml_mpr_331512020aml_mpr_331412040aml_mpr_331311080aml_mpr_331112050aml_mpr_331112030aml_mpr_331011070aml_mpr_330911040aml_mpr_330811020aml_med_331911000aml_med_331712010aml_med_331612000aml_med_331511000aml_med_331410000aml_med_331318000aml_med_331115000aml_med_331012020aml_ips_331910010aml_ips_331312000aml_ips_331310000aml_ips_331111030aml_ips_331014020aml_ext_331814220aml_ext_331412000aml_ext_331312000aml_ext_331112010aml_ext_331012020aml_doc_331120000aml_con_331413000aml_con_331411000aml_con_331312000aml_con_331115000aml_con_331011010aml_cbr_331910000aml_cbr_331810000aml_cbr_331710020aml_cbr_331610010aml_cbr_331510000aml_cbr_331411000aml_cbr_331310010aml_cbr_331111030aml_cbr_331013010aml_cbr_330911010aml_cbr_330810000aml_art_331813100aml_art_331813010aml_art_331711080aml_art_331612010aml_art_331413030aml_art_331314010aml_art_331113000aml_art_331012050aml_adb_331610000aml_adb_331314020aml_adb_331113120aml_adb_331011050aml_adb_331011040android13-mainline-wifi-releaseandroid13-mainline-tzdata4-releaseandroid13-mainline-tethering-releaseandroid13-mainline-sdkext-releaseandroid13-mainline-scheduling-releaseandroid13-mainline-resolv-releaseandroid13-mainline-permission-releaseandroid13-mainline-os-statsd-releaseandroid13-mainline-networking-releaseandroid13-mainline-mediaprovider-releaseandroid13-mainline-media-swcodec-releaseandroid13-mainline-media-releaseandroid13-mainline-ipsec-releaseandroid13-mainline-extservices-releaseandroid13-mainline-conscrypt-releaseandroid13-mainline-cellbroadcast-releaseandroid13-mainline-art-releaseandroid13-mainline-adbd-releaseaml_tz4_332714010
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/systemlibs/+/17464303 Change-Id: I7919dc05cb680ba1f1eac1adb2b27c17add627b8 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--car-qc-lib/res/drawable/qc_row_action_divider.xml6
-rw-r--r--car-qc-lib/res/drawable/qc_toggle_background.xml17
-rw-r--r--car-qc-lib/res/drawable/qc_toggle_rotary_background.xml28
-rw-r--r--car-qc-lib/res/drawable/qc_toggle_rotary_highlight.xml34
-rw-r--r--car-qc-lib/res/drawable/qc_toggle_rotary_shadow.xml25
-rw-r--r--car-qc-lib/res/drawable/qc_toggle_unavailable_background.xml16
-rw-r--r--car-qc-lib/res/values/colors.xml3
-rw-r--r--car-qc-lib/res/values/dimens.xml12
8 files changed, 102 insertions, 39 deletions
diff --git a/car-qc-lib/res/drawable/qc_row_action_divider.xml b/car-qc-lib/res/drawable/qc_row_action_divider.xml
index 75ffd46..62a8fe5 100644
--- a/car-qc-lib/res/drawable/qc_row_action_divider.xml
+++ b/car-qc-lib/res/drawable/qc_row_action_divider.xml
@@ -1,5 +1,5 @@
<!--
- ~ Copyright (C) 2021 The Android Open Source Project
+ ~ Copyright (C) 2022 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
@@ -17,5 +17,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:height="0dp"
- android:width="@dimen/qc_toggle_margin"/>
-</shape>
+ android:width="@dimen/qc_row_horizontal_margin"/>
+</shape> \ No newline at end of file
diff --git a/car-qc-lib/res/drawable/qc_toggle_background.xml b/car-qc-lib/res/drawable/qc_toggle_background.xml
index c139590..3688175 100644
--- a/car-qc-lib/res/drawable/qc_toggle_background.xml
+++ b/car-qc-lib/res/drawable/qc_toggle_background.xml
@@ -16,14 +16,13 @@
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background"
- android:width="@dimen/qc_toggle_size"
- android:height="@dimen/qc_toggle_size">
- <shape android:shape="rectangle">
- <solid android:color="@color/qc_toggle_background_color" />
- <corners android:radius="@dimen/qc_toggle_background_radius" />
- </shape>
+ android:width="@dimen/qc_toggle_size"
+ android:height="@dimen/qc_toggle_size"
+ android:start="@dimen/qc_toggle_background_padding"
+ android:top="@dimen/qc_toggle_background_padding"
+ android:drawable="@drawable/qc_toggle_button_background">
</item>
- <item android:width="@dimen/qc_toggle_size"
- android:height="@dimen/qc_toggle_size"
- android:drawable="@drawable/qc_toggle_rotary_background"/>
+ <item android:width="@dimen/qc_toggle_rotary_highlight_size"
+ android:height="@dimen/qc_toggle_rotary_highlight_size"
+ android:drawable="@drawable/qc_toggle_rotary_background"/>
</layer-list> \ No newline at end of file
diff --git a/car-qc-lib/res/drawable/qc_toggle_rotary_background.xml b/car-qc-lib/res/drawable/qc_toggle_rotary_background.xml
index 406c44c..c0eb106 100644
--- a/car-qc-lib/res/drawable/qc_toggle_rotary_background.xml
+++ b/car-qc-lib/res/drawable/qc_toggle_rotary_background.xml
@@ -14,21 +14,15 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_focused="true" android:state_pressed="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/car_ui_rotary_focus_pressed_fill_secondary_color"/>
- <stroke android:width="@dimen/car_ui_rotary_focus_pressed_stroke_width"
- android:color="@color/car_ui_rotary_focus_pressed_stroke_secondary_color"/>
- <corners android:radius="@dimen/qc_toggle_rotary_background_radius" />
- </shape>
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item
+ android:width="@dimen/qc_toggle_rotary_shadow_size"
+ android:height="@dimen/qc_toggle_rotary_shadow_size"
+ android:start="@dimen/qc_toggle_rotary_shadow_padding"
+ android:top="@dimen/qc_toggle_rotary_shadow_padding"
+ android:drawable="@drawable/qc_toggle_rotary_shadow">
</item>
- <item android:state_focused="true">
- <shape android:shape="rectangle">
- <solid android:color="@color/car_ui_rotary_focus_fill_secondary_color"/>
- <stroke android:width="@dimen/car_ui_rotary_focus_stroke_width"
- android:color="@color/car_ui_rotary_focus_stroke_secondary_color"/>
- <corners android:radius="@dimen/qc_toggle_rotary_background_radius" />
- </shape>
- </item>
-</selector> \ No newline at end of file
+ <item android:width="@dimen/qc_toggle_rotary_highlight_size"
+ android:height="@dimen/qc_toggle_rotary_highlight_size"
+ android:drawable="@drawable/qc_toggle_rotary_highlight"/>
+</layer-list> \ No newline at end of file
diff --git a/car-qc-lib/res/drawable/qc_toggle_rotary_highlight.xml b/car-qc-lib/res/drawable/qc_toggle_rotary_highlight.xml
new file mode 100644
index 0000000..5894a8f
--- /dev/null
+++ b/car-qc-lib/res/drawable/qc_toggle_rotary_highlight.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2021 The Android Open Source 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true" android:state_pressed="true">
+ <shape android:shape="rectangle">
+ <solid android:color="@color/car_ui_rotary_focus_pressed_fill_secondary_color"/>
+ <stroke android:width="@dimen/car_ui_rotary_focus_pressed_stroke_width"
+ android:color="@color/car_ui_rotary_focus_stroke_color"/>
+ <corners android:radius="@dimen/qc_toggle_rotary_highlight_radius" />
+ </shape>
+ </item>
+ <item android:state_focused="true">
+ <shape android:shape="rectangle">
+ <solid android:color="@color/car_ui_rotary_focus_fill_color"/>
+ <stroke android:width="@dimen/car_ui_rotary_focus_stroke_width"
+ android:color="@color/car_ui_rotary_focus_stroke_color"/>
+ <corners android:radius="@dimen/qc_toggle_rotary_highlight_radius" />
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/car-qc-lib/res/drawable/qc_toggle_rotary_shadow.xml b/car-qc-lib/res/drawable/qc_toggle_rotary_shadow.xml
new file mode 100644
index 0000000..2717321
--- /dev/null
+++ b/car-qc-lib/res/drawable/qc_toggle_rotary_shadow.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2022 The Android Open Source 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.
+ -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_focused="true" android:state_pressed="false">
+ <shape android:shape="rectangle">
+ <stroke android:width="@dimen/qc_toggle_rotary_shadow_width"
+ android:color="@color/qc_toggle_rotary_shadow_color"/>
+ <corners android:radius="@dimen/qc_toggle_rotary_shadow_radius" />
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/car-qc-lib/res/drawable/qc_toggle_unavailable_background.xml b/car-qc-lib/res/drawable/qc_toggle_unavailable_background.xml
index 98cbded..e9f2e12 100644
--- a/car-qc-lib/res/drawable/qc_toggle_unavailable_background.xml
+++ b/car-qc-lib/res/drawable/qc_toggle_unavailable_background.xml
@@ -16,16 +16,18 @@
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background"
- android:width="@dimen/qc_toggle_size"
- android:height="@dimen/qc_toggle_size">
+ android:width="@dimen/qc_toggle_size"
+ android:height="@dimen/qc_toggle_size"
+ android:start="@dimen/qc_toggle_background_padding"
+ android:top="@dimen/qc_toggle_background_padding">
<shape android:shape="rectangle">
<solid android:color="@color/qc_toggle_unavailable_background_color" />
<stroke android:color="@color/qc_toggle_unavailable_color"
- android:width="@dimen/qc_toggle_unavailable_outline_width" />
+ android:width="@dimen/qc_toggle_unavailable_outline_width" />
<corners android:radius="@dimen/qc_toggle_background_radius" />
</shape>
</item>
- <item android:width="@dimen/qc_toggle_size"
- android:height="@dimen/qc_toggle_size"
- android:drawable="@drawable/qc_toggle_rotary_background"/>
-</layer-list>
+ <item android:width="@dimen/qc_toggle_rotary_highlight_size"
+ android:height="@dimen/qc_toggle_rotary_highlight_size"
+ android:drawable="@drawable/qc_toggle_rotary_background"/>
+</layer-list> \ No newline at end of file
diff --git a/car-qc-lib/res/values/colors.xml b/car-qc-lib/res/values/colors.xml
index e3fbd6f..62bcfdc 100644
--- a/car-qc-lib/res/values/colors.xml
+++ b/car-qc-lib/res/values/colors.xml
@@ -18,5 +18,6 @@
<color name="qc_start_icon_color">@android:color/white</color>
<color name="qc_toggle_off_background_color">#626262</color>
<color name="qc_toggle_unavailable_background_color">@android:color/transparent</color>
- <color name="qc_toggle_unavailable_color">#75FFFFFF</color>
+ <color name="qc_toggle_unavailable_color">#37FFFFFF</color>
+ <color name="qc_toggle_rotary_shadow_color">#C7000000</color>
</resources> \ No newline at end of file
diff --git a/car-qc-lib/res/values/dimens.xml b/car-qc-lib/res/values/dimens.xml
index 6247561..b973774 100644
--- a/car-qc-lib/res/values/dimens.xml
+++ b/car-qc-lib/res/values/dimens.xml
@@ -26,10 +26,18 @@
<dimen name="qc_action_items_horizontal_margin">32dp</dimen>
<dimen name="qc_toggle_size">72dp</dimen>
<dimen name="qc_toggle_margin">12dp</dimen>
+ <dimen name="qc_row_horizontal_margin">16dp</dimen>
<dimen name="qc_toggle_background_radius">16dp</dimen>
- <dimen name="qc_toggle_rotary_background_radius">11dp</dimen>
- <dimen name="qc_toggle_foreground_icon_inset">14dp</dimen>
+ <dimen name="qc_toggle_background_padding">4dp</dimen>
+ <dimen name="qc_toggle_foreground_icon_inset">18dp</dimen>
<dimen name="qc_toggle_unavailable_outline_width">2dp</dimen>
+ <dimen name="qc_toggle_rotary_highlight_size">80dp</dimen>
+ <dimen name="qc_toggle_rotary_highlight_radius">20dp</dimen>
+ <dimen name="qc_toggle_rotary_shadow_size">64dp</dimen>
+ <dimen name="qc_toggle_rotary_shadow_width">4dp</dimen>
+ <dimen name="qc_toggle_rotary_shadow_radius">16dp</dimen>
+ <dimen name="qc_toggle_rotary_shadow_padding">8dp</dimen>
+
<dimen name="qc_seekbar_padding_top">16dp</dimen>
</resources> \ No newline at end of file