Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 1 | <?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 Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 17 | <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 18 | <aapt:attr name="android:drawable"> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 19 | <vector android:name="root" |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 20 | android:width="24dp" |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 21 | 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 Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 28 | </group> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 29 | </vector> |
| 30 | </aapt:attr> |
| 31 | |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 32 | <!-- Repeat all animations 3 times but don't fade out at the end --> |
| 33 | <target android:name="root"> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 34 | <aapt:attr name="android:animation"> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 35 | <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 Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 70 | </set> |
| 71 | </aapt:attr> |
| 72 | </target> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 73 | <target android:name="icon"> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 74 | <aapt:attr name="android:animation"> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 75 | <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 Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 82 | <aapt:attr name="android:interpolator"> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 83 | <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 84 | </aapt:attr> |
| 85 | </objectAnimator> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 86 | |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 87 | <!-- 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 Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 93 | |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 94 | <!-- 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 Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 99 | <aapt:attr name="android:interpolator"> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 100 | <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 101 | </aapt:attr> |
| 102 | </objectAnimator> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 103 | |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 104 | <!-- 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 Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 116 | <aapt:attr name="android:interpolator"> |
Mike Digman | 1e28a5a | 2018-02-14 10:49:19 -0800 | [diff] [blame] | 117 | <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 118 | </aapt:attr> |
| 119 | </objectAnimator> |
| 120 | </set> |
| 121 | </aapt:attr> |
| 122 | </target> |
Mike Digman | 7d09277 | 2018-01-11 12:10:32 -0800 | [diff] [blame] | 123 | </animated-vector> |