aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Huang <yabinh@google.com>2020-05-12 13:24:55 -0700
committerYabin Huang <yabinh@google.com>2020-05-14 18:43:19 -0700
commit2b23780eadb2a3d42ad2d2341bd5d7098671d183 (patch)
tree7f3482edf1dad51a9ba80e9237b8a2058b5ab540
parentb5b8a5d6a783e12ca0ee06e7770b94dae44a1d9a (diff)
downloadtests-2b23780eadb2a3d42ad2d2341bd5d7098671d183.tar.gz
Make SeekBar use the focus highlight defined in chassis
Bug: 156293117 Test: manual Change-Id: I9e45f112c9dde1d99861835f89072233c60de510
-rw-r--r--RotaryPlayground/res/drawable/seek_bar_background.xml20
-rw-r--r--RotaryPlayground/res/layout/rotary_direct_manipulation.xml3
2 files changed, 22 insertions, 1 deletions
diff --git a/RotaryPlayground/res/drawable/seek_bar_background.xml b/RotaryPlayground/res/drawable/seek_bar_background.xml
new file mode 100644
index 0000000..8d66a3b
--- /dev/null
+++ b/RotaryPlayground/res/drawable/seek_bar_background.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 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.
+ -->
+
+<ripple xmlns:android="http://schemas.android.com/apk/res/android"
+ android:color="@color/car_ui_rotary_focus_color"
+ android:radius="16dp" />
diff --git a/RotaryPlayground/res/layout/rotary_direct_manipulation.xml b/RotaryPlayground/res/layout/rotary_direct_manipulation.xml
index 6203cdd..5b385b3 100644
--- a/RotaryPlayground/res/layout/rotary_direct_manipulation.xml
+++ b/RotaryPlayground/res/layout/rotary_direct_manipulation.xml
@@ -60,7 +60,8 @@
android:layout_weight="1">
<SeekBar
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:background="@drawable/seek_bar_background">
</SeekBar>
<RadialTimePickerView
android:layout_width="match_parent"