From c08d19dcdfca50812f3be9315d849b7fede3ae20 Mon Sep 17 00:00:00 2001 From: Nick Butcher Date: Fri, 19 Aug 2016 16:46:48 +0100 Subject: [PATCH] Tweaks to password visibility anim. --- app/src/main/java/io/plaidapp/ui/widget/PasswordEntry.java | 7 +++++-- app/src/main/res/drawable/avd_show_password.xml | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/plaidapp/ui/widget/PasswordEntry.java b/app/src/main/java/io/plaidapp/ui/widget/PasswordEntry.java index 0ae19354b..7cd6d77e3 100644 --- a/app/src/main/java/io/plaidapp/ui/widget/PasswordEntry.java +++ b/app/src/main/java/io/plaidapp/ui/widget/PasswordEntry.java @@ -132,6 +132,9 @@ private int getInsetStart() { return insetStart; } + /** + * A drawable for animating the switch between a masked and visible password field. + */ static class MaskMorphDrawable extends Drawable { private static final char[] PASSWORD_MASK = { '•' }; @@ -261,7 +264,7 @@ private Animator animateMask( return anim; } - public static final Property RADIUS + static final Property RADIUS = new AnimUtils.FloatProperty("dotRadius") { @Override @@ -275,7 +278,7 @@ public Float get(MaskMorphDrawable drawable) { } }; - public static final Property OFFSET_Y + static final Property OFFSET_Y = new AnimUtils.FloatProperty("dotOffsetY") { @Override diff --git a/app/src/main/res/drawable/avd_show_password.xml b/app/src/main/res/drawable/avd_show_password.xml index b0e8313fe..bd0395aeb 100644 --- a/app/src/main/res/drawable/avd_show_password.xml +++ b/app/src/main/res/drawable/avd_show_password.xml @@ -59,7 +59,7 @@ android:propertyName="pathData" android:valueFrom="@string/path_password_eye_mask_strike_through" android:valueTo="@string/path_password_eye_mask_visible" - android:duration="260" + android:duration="200" android:interpolator="@android:interpolator/fast_out_linear_in" android:valueType="pathType" /> @@ -75,7 +75,7 @@ android:propertyName="trimPathEnd" android:valueFrom="1" android:valueTo="0" - android:duration="260" + android:duration="200" android:interpolator="@android:interpolator/fast_out_linear_in" />