• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2020 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License
16  -->
17
18<selector xmlns:android="http://schemas.android.com/apk/res/android">
19
20    <item android:state_focused="true"
21          android:state_pressed="true">>
22        <set>
23            <objectAnimator
24                android:duration="160"
25                android:propertyName="translationZ"
26                android:valueTo="6dp"
27                android:valueType="floatType"
28                android:interpolator="@android:anim/accelerate_interpolator" />
29
30            <objectAnimator
31                android:duration="160"
32                android:propertyName="scaleX"
33                android:valueTo="1.025"
34                android:valueType="floatType"
35                android:interpolator="@android:anim/accelerate_interpolator" />
36
37            <objectAnimator
38                android:duration="160"
39                android:propertyName="scaleY"
40                android:valueTo="1.025"
41                android:valueType="floatType"
42                android:interpolator="@android:anim/accelerate_interpolator" />
43
44        </set>
45    </item>
46
47    <item android:state_focused="true"
48          android:state_pressed="false">
49        <set>
50            <objectAnimator
51                android:duration="320"
52                android:propertyName="translationZ"
53                android:valueTo="12dp"
54                android:valueType="floatType"
55                android:interpolator="@android:anim/accelerate_interpolator" />
56
57            <objectAnimator
58                android:duration="320"
59                android:propertyName="scaleX"
60                android:valueTo="1.05"
61                android:valueType="floatType"
62                android:interpolator="@android:anim/accelerate_interpolator" />
63
64            <objectAnimator
65                android:duration="320"
66                android:propertyName="scaleY"
67                android:valueTo="1.05"
68                android:valueType="floatType"
69                android:interpolator="@android:anim/accelerate_interpolator" />
70        </set>
71    </item>
72
73    <item android:state_focused="false">
74        <set>
75            <objectAnimator
76                android:duration="320"
77                android:propertyName="translationZ"
78                android:valueTo="0dp"
79                android:valueType="floatType"
80                android:interpolator="@android:anim/decelerate_interpolator" />
81
82            <objectAnimator
83                android:duration="320"
84                android:propertyName="scaleX"
85                android:valueTo="1"
86                android:valueType="floatType"
87                android:interpolator="@android:anim/decelerate_interpolator" />
88
89            <objectAnimator
90                android:duration="320"
91                android:propertyName="scaleY"
92                android:valueTo="1"
93                android:valueType="floatType"
94                android:interpolator="@android:anim/decelerate_interpolator" />
95        </set>
96    </item>
97
98</selector>