blob: 93df340f59d4a492ab6aa51cca660fc9cafc80c5 [file] [log] [blame]
Mike Digman7d092772018-01-11 12:10:32 -08001<?xml version="1.0" encoding="utf-8"?>
2<!--
3 Copyright (C) 2017 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-->
Mike Digman1e28a5a2018-02-14 10:49:19 -080017<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt">
Mike Digman7d092772018-01-11 12:10:32 -080018 <aapt:attr name="android:drawable">
Mike Digman1e28a5a2018-02-14 10:49:19 -080019 <vector android:name="root"
Mike Digman7d092772018-01-11 12:10:32 -080020 android:width="24dp"
Mike Digman1e28a5a2018-02-14 10:49:19 -080021 android:height="24dp"
22 android:viewportWidth="24.0"
23 android:viewportHeight="24.0">
24 <group android:name="icon" android:pivotX="12" android:pivotY="12">
25 <!-- Tint color to be set directly -->
26 <path android:fillColor="#FFFFFFFF"
27 android:pathData="M17,1.01L7,1c-1.1,0 -2,0.9 -2,2v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3c0,-1.1 -0.9,-1.99 -2,-1.99zM17,19H7V5h10v14z"/>
Mike Digman7d092772018-01-11 12:10:32 -080028 </group>
Mike Digman7d092772018-01-11 12:10:32 -080029 </vector>
30 </aapt:attr>
31
Mike Digman1e28a5a2018-02-14 10:49:19 -080032 <!-- Repeat all animations 3 times but don't fade out at the end -->
33 <target android:name="root">
Mike Digman7d092772018-01-11 12:10:32 -080034 <aapt:attr name="android:animation">
Mike Digman1e28a5a2018-02-14 10:49:19 -080035 <set android:ordering="sequentially">
36 <!-- Linear fade in-->
37 <objectAnimator android:propertyName="alpha"
38 android:duration="100"
39 android:valueFrom="0"
40 android:valueTo="1"
41 android:interpolator="@android:anim/linear_interpolator" />
42 <!-- Linear fade out -->
43 <objectAnimator android:propertyName="alpha"
44 android:duration="100"
45 android:startOffset="1700"
46 android:valueFrom="1"
47 android:valueTo="0"
48 android:interpolator="@android:anim/linear_interpolator"/>
49 <!-- Linear fade in-->
50 <objectAnimator android:propertyName="alpha"
51 android:duration="100"
52 android:startOffset="100"
53 android:valueFrom="0"
54 android:valueTo="1"
55 android:interpolator="@android:anim/linear_interpolator" />
56 <!-- Linear fade out -->
57 <objectAnimator android:propertyName="alpha"
58 android:duration="100"
59 android:startOffset="1700"
60 android:valueFrom="1"
61 android:valueTo="0"
62 android:interpolator="@android:anim/linear_interpolator"/>
63 <!-- Linear fade in-->
64 <objectAnimator android:propertyName="alpha"
65 android:duration="100"
66 android:startOffset="100"
67 android:valueFrom="0"
68 android:valueTo="1"
69 android:interpolator="@android:anim/linear_interpolator" />
Mike Digman7d092772018-01-11 12:10:32 -080070 </set>
71 </aapt:attr>
72 </target>
Mike Digman1e28a5a2018-02-14 10:49:19 -080073 <target android:name="icon">
Mike Digman7d092772018-01-11 12:10:32 -080074 <aapt:attr name="android:animation">
Mike Digman1e28a5a2018-02-14 10:49:19 -080075 <set android:ordering="sequentially">
76 <!-- Icon rotation with start timing offset after fade in -->
77 <objectAnimator android:propertyName="rotation"
78 android:startOffset="100"
79 android:duration="600"
80 android:valueFrom="?attr/rotateButtonStartAngle"
81 android:valueTo="?attr/rotateButtonEndAngle">
Mike Digman7d092772018-01-11 12:10:32 -080082 <aapt:attr name="android:interpolator">
Mike Digman1e28a5a2018-02-14 10:49:19 -080083 <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/>
Mike Digman7d092772018-01-11 12:10:32 -080084 </aapt:attr>
85 </objectAnimator>
Mike Digman7d092772018-01-11 12:10:32 -080086
Mike Digman1e28a5a2018-02-14 10:49:19 -080087 <!-- Reset rotation position for fade in -->
88 <objectAnimator android:propertyName="rotation"
89 android:startOffset="1300"
90 android:duration="100"
91 android:valueFrom="?attr/rotateButtonStartAngle"
92 android:valueTo="?attr/rotateButtonStartAngle"/>
Mike Digman7d092772018-01-11 12:10:32 -080093
Mike Digman1e28a5a2018-02-14 10:49:19 -080094 <!-- Icon rotation with start timing offset after fade in -->
95 <objectAnimator android:propertyName="rotation"
96 android:duration="600"
97 android:valueFrom="?attr/rotateButtonStartAngle"
98 android:valueTo="?attr/rotateButtonEndAngle">
Mike Digman7d092772018-01-11 12:10:32 -080099 <aapt:attr name="android:interpolator">
Mike Digman1e28a5a2018-02-14 10:49:19 -0800100 <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/>
Mike Digman7d092772018-01-11 12:10:32 -0800101 </aapt:attr>
102 </objectAnimator>
Mike Digman7d092772018-01-11 12:10:32 -0800103
Mike Digman1e28a5a2018-02-14 10:49:19 -0800104 <!-- Reset rotation position for fade in -->
105 <objectAnimator android:propertyName="rotation"
106 android:startOffset="1300"
107 android:duration="100"
108 android:valueFrom="?attr/rotateButtonStartAngle"
109 android:valueTo="?attr/rotateButtonStartAngle"/>
110
111 <!-- Icon rotation with start timing offset after fade in -->
112 <objectAnimator android:propertyName="rotation"
113 android:duration="600"
114 android:valueFrom="?attr/rotateButtonStartAngle"
115 android:valueTo="?attr/rotateButtonEndAngle">
Mike Digman7d092772018-01-11 12:10:32 -0800116 <aapt:attr name="android:interpolator">
Mike Digman1e28a5a2018-02-14 10:49:19 -0800117 <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/>
Mike Digman7d092772018-01-11 12:10:32 -0800118 </aapt:attr>
119 </objectAnimator>
120 </set>
121 </aapt:attr>
122 </target>
Mike Digman7d092772018-01-11 12:10:32 -0800123</animated-vector>