1 <?xml version="1.0" encoding="utf-8"?> 2 <!-- 3 ~ Copyright (C) 2016 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 <animated-vector 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:aapt="http://schemas.android.com/aapt"> 21 22 <aapt:attr name="android:drawable"> 23 24 <vector 25 android:width="24dp" 26 android:height="24dp" 27 android:viewportHeight="24" 28 android:viewportWidth="24"> 29 30 <path 31 android:name="strike_through" 32 android:pathData="@string/path_password_strike_through" 33 android:strokeColor="@android:color/white" 34 android:strokeLineCap="square" 35 android:strokeWidth="1.8"/> 36 37 <group> 38 39 <clip-path 40 android:name="eye_mask" 41 android:pathData="@string/path_password_eye_mask_strike_through"/> 42 43 <path 44 android:name="eye" 45 android:fillColor="@android:color/white" 46 android:pathData="@string/path_password_eye"/> 47 48 </group> 49 50 </vector> 51 52 </aapt:attr> 53 54 <target android:name="eye_mask"> 55 56 <aapt:attr name="android:animation"> 57 58 <objectAnimator 59 android:duration="@integer/show_password_duration" 60 android:interpolator="@android:interpolator/fast_out_linear_in" 61 android:propertyName="pathData" 62 android:valueFrom="@string/path_password_eye_mask_strike_through" 63 android:valueTo="@string/path_password_eye_mask_visible" 64 android:valueType="pathType"/> 65 66 </aapt:attr> 67 68 </target> 69 70 <target android:name="strike_through"> 71 72 <aapt:attr name="android:animation"> 73 74 <objectAnimator 75 android:duration="@integer/show_password_duration" 76 android:interpolator="@android:interpolator/fast_out_linear_in" 77 android:propertyName="trimPathEnd" 78 android:valueFrom="1" 79 android:valueTo="0"/> 80 81 </aapt:attr> 82 83 </target> 84 85 </animated-vector> 86