| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| Copyright (C) 2017 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. |
| --> |
| <animated-vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"> |
| <aapt:attr name="android:drawable"> |
| <vector android:name="root" |
| android:width="24dp" |
| android:height="24dp" |
| android:viewportWidth="24.0" |
| android:viewportHeight="24.0"> |
| <group android:name="icon" android:pivotX="12" android:pivotY="12"> |
| <!-- Tint color to be set directly --> |
| <path android:fillColor="#FFFFFFFF" |
| 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"/> |
| </group> |
| </vector> |
| </aapt:attr> |
| |
| <!-- Repeat all animations 3 times but don't fade out at the end --> |
| <target android:name="root"> |
| <aapt:attr name="android:animation"> |
| <set android:ordering="sequentially"> |
| <!-- Linear fade in--> |
| <objectAnimator android:propertyName="alpha" |
| android:duration="100" |
| android:valueFrom="0" |
| android:valueTo="1" |
| android:interpolator="@android:anim/linear_interpolator" /> |
| <!-- Linear fade out --> |
| <objectAnimator android:propertyName="alpha" |
| android:duration="100" |
| android:startOffset="1700" |
| android:valueFrom="1" |
| android:valueTo="0" |
| android:interpolator="@android:anim/linear_interpolator"/> |
| <!-- Linear fade in--> |
| <objectAnimator android:propertyName="alpha" |
| android:duration="100" |
| android:startOffset="100" |
| android:valueFrom="0" |
| android:valueTo="1" |
| android:interpolator="@android:anim/linear_interpolator" /> |
| <!-- Linear fade out --> |
| <objectAnimator android:propertyName="alpha" |
| android:duration="100" |
| android:startOffset="1700" |
| android:valueFrom="1" |
| android:valueTo="0" |
| android:interpolator="@android:anim/linear_interpolator"/> |
| <!-- Linear fade in--> |
| <objectAnimator android:propertyName="alpha" |
| android:duration="100" |
| android:startOffset="100" |
| android:valueFrom="0" |
| android:valueTo="1" |
| android:interpolator="@android:anim/linear_interpolator" /> |
| </set> |
| </aapt:attr> |
| </target> |
| <target android:name="icon"> |
| <aapt:attr name="android:animation"> |
| <set android:ordering="sequentially"> |
| <!-- Icon rotation with start timing offset after fade in --> |
| <objectAnimator android:propertyName="rotation" |
| android:startOffset="100" |
| android:duration="600" |
| android:valueFrom="?attr/rotateButtonStartAngle" |
| android:valueTo="?attr/rotateButtonEndAngle"> |
| <aapt:attr name="android:interpolator"> |
| <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/> |
| </aapt:attr> |
| </objectAnimator> |
| |
| <!-- Reset rotation position for fade in --> |
| <objectAnimator android:propertyName="rotation" |
| android:startOffset="1300" |
| android:duration="100" |
| android:valueFrom="?attr/rotateButtonStartAngle" |
| android:valueTo="?attr/rotateButtonStartAngle"/> |
| |
| <!-- Icon rotation with start timing offset after fade in --> |
| <objectAnimator android:propertyName="rotation" |
| android:duration="600" |
| android:valueFrom="?attr/rotateButtonStartAngle" |
| android:valueTo="?attr/rotateButtonEndAngle"> |
| <aapt:attr name="android:interpolator"> |
| <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/> |
| </aapt:attr> |
| </objectAnimator> |
| |
| <!-- Reset rotation position for fade in --> |
| <objectAnimator android:propertyName="rotation" |
| android:startOffset="1300" |
| android:duration="100" |
| android:valueFrom="?attr/rotateButtonStartAngle" |
| android:valueTo="?attr/rotateButtonStartAngle"/> |
| |
| <!-- Icon rotation with start timing offset after fade in --> |
| <objectAnimator android:propertyName="rotation" |
| android:duration="600" |
| android:valueFrom="?attr/rotateButtonStartAngle" |
| android:valueTo="?attr/rotateButtonEndAngle"> |
| <aapt:attr name="android:interpolator"> |
| <pathInterpolator android:pathData="M 0.0,0.0 c0.408,1.181 0.674,1.08 1.0,1.0"/> |
| </aapt:attr> |
| </objectAnimator> |
| </set> |
| </aapt:attr> |
| </target> |
| </animated-vector> |