diff options
author | Calvin Huang <calhuang@google.com> | 2022-11-23 16:33:42 -0800 |
---|---|---|
committer | Calvin Huang <calhuang@google.com> | 2022-11-30 13:12:26 -0800 |
commit | 8d7509604ee9431dda57c585cf20c03baff05224 (patch) | |
tree | fcc2c4e9f0834f8c5c9b619afad54b40e0573295 | |
parent | c1cf39180758e2acce85b8f9c73a6ab4914eb797 (diff) | |
download | systemlibs-8d7509604ee9431dda57c585cf20c03baff05224.tar.gz |
Add ovelayable to car-qc-lib
Change id.seekbar to id.qc_seekbar to avoid conflict with car_ui_lib
Test: manual
Bug: 255253253
Change-Id: I1c27ef65058a441a801173694bf7cab46596ee02
4 files changed, 89 insertions, 3 deletions
diff --git a/car-qc-lib/res/layout/qc_row_view.xml b/car-qc-lib/res/layout/qc_row_view.xml index 6656b29..d71d137 100644 --- a/car-qc-lib/res/layout/qc_row_view.xml +++ b/car-qc-lib/res/layout/qc_row_view.xml @@ -121,7 +121,7 @@ app:layout_constraintTop_toBottomOf="@+id/barrier2" app:layout_constraintBottom_toBottomOf="parent"> <com.android.car.qc.view.QCSeekBarView - android:id="@+id/seekbar" + android:id="@+id/qc_seekbar" android:layout_width="match_parent" android:layout_height="wrap_content" style="@style/Widget.QC.SeekBar"/> diff --git a/car-qc-lib/res/values/overlayable.xml b/car-qc-lib/res/values/overlayable.xml new file mode 100644 index 0000000..536e718 --- /dev/null +++ b/car-qc-lib/res/values/overlayable.xml @@ -0,0 +1,86 @@ +<?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. + --> +<!-- +THIS FILE WAS AUTO GENERATED, DO NOT EDIT MANUALLY. +REGENERATE USING packages/apps/Car/tests/tools/rro/generate-overlayable.py +--> +<resources> + <overlayable name="car-qc-lib"> + <policy type="system|product|signature"> + <item type="attr" name="state_toggle_unavailable"/> + <item type="color" name="qc_start_icon_color"/> + <item type="color" name="qc_toggle_background_color"/> + <item type="color" name="qc_toggle_icon_fill_color"/> + <item type="color" name="qc_toggle_off_background_color"/> + <item type="color" name="qc_toggle_rotary_shadow_color"/> + <item type="color" name="qc_toggle_unavailable_background_color"/> + <item type="color" name="qc_toggle_unavailable_color"/> + <item type="dimen" name="qc_action_items_horizontal_margin"/> + <item type="dimen" name="qc_row_content_margin"/> + <item type="dimen" name="qc_row_horizontal_margin"/> + <item type="dimen" name="qc_row_icon_margin_end"/> + <item type="dimen" name="qc_row_icon_size"/> + <item type="dimen" name="qc_row_margin_vertical"/> + <item type="dimen" name="qc_row_min_height"/> + <item type="dimen" name="qc_row_padding_end"/> + <item type="dimen" name="qc_row_padding_start"/> + <item type="dimen" name="qc_seekbar_padding_top"/> + <item type="dimen" name="qc_toggle_background_padding"/> + <item type="dimen" name="qc_toggle_background_radius"/> + <item type="dimen" name="qc_toggle_foreground_icon_inset"/> + <item type="dimen" name="qc_toggle_margin"/> + <item type="dimen" name="qc_toggle_rotary_highlight_radius"/> + <item type="dimen" name="qc_toggle_rotary_highlight_size"/> + <item type="dimen" name="qc_toggle_rotary_shadow_padding"/> + <item type="dimen" name="qc_toggle_rotary_shadow_radius"/> + <item type="dimen" name="qc_toggle_rotary_shadow_size"/> + <item type="dimen" name="qc_toggle_rotary_shadow_width"/> + <item type="dimen" name="qc_toggle_size"/> + <item type="dimen" name="qc_toggle_unavailable_outline_width"/> + <item type="drawable" name="qc_row_action_divider"/> + <item type="drawable" name="qc_seekbar_wrapper_background"/> + <item type="drawable" name="qc_toggle_background"/> + <item type="drawable" name="qc_toggle_button_background"/> + <item type="drawable" name="qc_toggle_rotary_background"/> + <item type="drawable" name="qc_toggle_rotary_highlight"/> + <item type="drawable" name="qc_toggle_rotary_shadow"/> + <item type="drawable" name="qc_toggle_unavailable_background"/> + <item type="id" name="barrier1"/> + <item type="id" name="barrier2"/> + <item type="id" name="qc_icon"/> + <item type="id" name="qc_row_content"/> + <item type="id" name="qc_row_end_items"/> + <item type="id" name="qc_row_start_items"/> + <item type="id" name="qc_seekbar"/> + <item type="id" name="qc_seekbar_wrapper"/> + <item type="id" name="qc_summary"/> + <item type="id" name="qc_tile_toggle_button"/> + <item type="id" name="qc_tile_wrapper"/> + <item type="id" name="qc_title"/> + <item type="id" name="qc_toggle_button"/> + <item type="layout" name="qc_action_switch"/> + <item type="layout" name="qc_action_toggle"/> + <item type="layout" name="qc_row_view"/> + <item type="layout" name="qc_tile_view"/> + <item type="style" name="TextAppearance.QC"/> + <item type="style" name="TextAppearance.QC.Subtitle"/> + <item type="style" name="TextAppearance.QC.Title"/> + <item type="style" name="Widget.QC"/> + <item type="style" name="Widget.QC.SeekBar"/> + </policy> + </overlayable> +</resources>
\ No newline at end of file diff --git a/car-qc-lib/src/com/android/car/qc/view/QCRowView.java b/car-qc-lib/src/com/android/car/qc/view/QCRowView.java index 1e10e4b..9794058 100644 --- a/car-qc-lib/src/com/android/car/qc/view/QCRowView.java +++ b/car-qc-lib/src/com/android/car/qc/view/QCRowView.java @@ -193,7 +193,7 @@ public class QCRowView extends FrameLayout { mStartItemsContainer = findViewById(R.id.qc_row_start_items); mEndItemsContainer = findViewById(R.id.qc_row_end_items); mSeekBarContainer = findViewById(R.id.qc_seekbar_wrapper); - mSeekBar = findViewById(R.id.seekbar); + mSeekBar = findViewById(R.id.qc_seekbar); } void setActionListener(QCActionListener listener) { diff --git a/car-qc-lib/tests/unit/src/com/android/car/qc/view/QCRowViewTest.java b/car-qc-lib/tests/unit/src/com/android/car/qc/view/QCRowViewTest.java index 647317a..63f5f0b 100644 --- a/car-qc-lib/tests/unit/src/com/android/car/qc/view/QCRowViewTest.java +++ b/car-qc-lib/tests/unit/src/com/android/car/qc/view/QCRowViewTest.java @@ -203,7 +203,7 @@ public class QCRowViewTest { .addSlider(new QCSlider.Builder().setInputAction(action).build()) .build(); mView.setRow(row); - SeekBar seekBar = mView.findViewById(R.id.seekbar); + SeekBar seekBar = mView.findViewById(R.id.qc_seekbar); seekBar.setProgress(50); MotionEvent motionEvent = ExtendedMockito.mock(MotionEvent.class); ExtendedMockito.when(motionEvent.getAction()).thenReturn(MotionEvent.ACTION_UP); |