• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2018 The Android Open Source Project
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8  http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15-->
16<selector
17    xmlns:android="http://schemas.android.com/apk/res/android">
18  <item
19      android:state_activated="true">
20    <shape
21        xmlns:android="http://schemas.android.com/apk/res/android"
22        android:shape="oval">
23      <stroke
24          android:color="@color/car_tint"
25          android:width="@dimen/car_action_bar_activation_ring_stroke_width">
26      </stroke>
27      <size
28          android:height="@dimen/car_action_bar_activation_ring_radius"
29          android:width="@dimen/car_action_bar_activation_ring_radius"/>
30    </shape>
31  </item>
32  <!--Yes, this is a load-bearing invisible circle.-->
33  <!--Android doesn't remeasure foregrounds when state_activated changes, -->
34  <!--so we need a default drawable with the same size as the one we actually want to draw-->
35  <item>
36    <shape
37        xmlns:android="http://schemas.android.com/apk/res/android"
38        android:shape="oval">
39      <stroke
40          android:color="#00000000"
41          android:width="@dimen/car_action_bar_activation_ring_stroke_width">
42      </stroke>
43      <size
44          android:height="@dimen/car_action_bar_activation_ring_radius"
45          android:width="@dimen/car_action_bar_activation_ring_radius"/>
46    </shape>
47  </item>
48</selector>
49