1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2019 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<animated-vector xmlns:android="http://schemas.android.com/apk/res/android" 18 xmlns:aapt="http://schemas.android.com/aapt"> 19 <aapt:attr name="android:drawable"> 20 <vector xmlns:android="http://schemas.android.com/apk/res/android" 21 xmlns:aapt="http://schemas.android.com/aapt" 22 android:width="36dp" 23 android:height="36dp" 24 android:viewportHeight="64" 25 android:viewportWidth="64"> 26 27 <group android:name="background"> 28 <path android:pathData="M0,0 L 64,0 64,64 0,64 z" 29 android:fillColor="@android:color/transparent"/> 30 </group> 31 32 <!-- Gradient starts offscreen so it is not visible in the first frame before start --> 33 <group android:name="gradient" android:translateX="-128"> 34 <path 35 android:pathData="M0,0 L 128,0 128,128 0,128 z"> 36 <aapt:attr name="android:fillColor"> 37 <gradient 38 android:type="linear" 39 android:startX="0" 40 android:endX="128" 41 android:startY="0" 42 android:endY="0"> 43 <item 44 android:color="@android:color/transparent" 45 android:offset="0.0" /> 46 <item 47 android:color="@android:color/transparent" 48 android:offset="0.5" /> 49 <item 50 android:color="@android:color/transparent" 51 android:offset="1.0" /> 52 </gradient> 53 </aapt:attr> 54 </path> 55 </group> 56 57 <!-- Use a foregroud with a cutout shape matching direct share inset for appx applied 58 shadow. Using clip-path is a more elegant solution but leaves awful jaggies around 59 the path's shape. --> 60 <group android:name="cover"> 61 <path android:fillColor="@android:color/transparent" 62 android:pathData="M0,0 L64,0 L64,64 L0,64 L0,0 Z M59.0587325,42.453601 C60.3124932,39.2104785 61,35.6855272 61,32 C61,15.9837423 48.0162577,3 32,3 C15.9837423,3 3,15.9837423 3,32 C3,48.0162577 15.9837423,61 32,61 C35.6855272,61 39.2104785,60.3124932 42.453601,59.0587325 C44.3362195,60.2864794 46.5847839,61 49,61 C55.627417,61 61,55.627417 61,49 C61,46.5847839 60.2864794,44.3362195 59.0587325,42.453601 Z"/> 63 </group> 64 </vector> 65 </aapt:attr> 66 67 <!-- This AVD uses special properties so that once started it will loop infinitely with no 68 need for callbacks to restart. --> 69 <target android:name="gradient"> 70 <aapt:attr name="android:animation"> 71 <objectAnimator 72 android:duration="1700" 73 android:pathData="M -128,0 L 192,0" 74 android:propertyXName="translateX" 75 android:repeatMode="restart" 76 android:repeatCount="infinite" 77 android:startOffset="0"> 78 <aapt:attr name="android:interpolator"> 79 <pathInterpolator android:pathData="M 0.0,0.0 c0.167,0.167 0.833,0.833 1.0,1.0" /> 80 </aapt:attr> 81 </objectAnimator> 82 </aapt:attr> 83 </target> 84</animated-vector> 85