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 android:trimPathEnd="0"/> 37 38 <group> 39 40 <clip-path 41 android:name="eye_mask" 42 android:pathData="@string/path_password_eye_mask_visible"/> 43 44 <path 45 android:name="eye" 46 android:fillColor="@android:color/white" 47 android:pathData="@string/path_password_eye"/> 48 49 </group> 50 51 </vector> 52 53 </aapt:attr> 54 55 <target android:name="eye_mask"> 56 57 <aapt:attr name="android:animation"> 58 59 <objectAnimator 60 android:duration="@integer/hide_password_duration" 61 android:interpolator="@android:interpolator/fast_out_slow_in" 62 android:propertyName="pathData" 63 android:valueFrom="@string/path_password_eye_mask_visible" 64 android:valueTo="@string/path_password_eye_mask_strike_through" 65 android:valueType="pathType"/> 66 67 </aapt:attr> 68 69 </target> 70 71 <target android:name="strike_through"> 72 73 <aapt:attr name="android:animation"> 74 75 <objectAnimator 76 android:duration="@integer/hide_password_duration" 77 android:interpolator="@android:interpolator/fast_out_slow_in" 78 android:propertyName="trimPathEnd" 79 android:valueFrom="0" 80 android:valueTo="1"/> 81 82 </aapt:attr> 83 84 </target> 85 86 </animated-vector> 87