From 65d56ec5fef1a4777a4b66c54fe6f387403bc220 Mon Sep 17 00:00:00 2001 From: ztenghui Date: Mon, 9 Oct 2017 16:24:21 -0700 Subject: [PATCH] Matching interpolator for ripple Matching the interpolators to be declerate on both enter and exit. According to the UX team feedback. b/63635160 Test: demo app, settings app and calculator app Change-Id: I49b88ef73f0bd45cd2b2c26feb2443633f171575 --- graphics/java/android/graphics/drawable/RippleForeground.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/java/android/graphics/drawable/RippleForeground.java b/graphics/java/android/graphics/drawable/RippleForeground.java index ed417b97bbeb7..a675eaf852977 100644 --- a/graphics/java/android/graphics/drawable/RippleForeground.java +++ b/graphics/java/android/graphics/drawable/RippleForeground.java @@ -169,13 +169,13 @@ class RippleForeground extends RippleComponent { final ObjectAnimator tweenRadius = ObjectAnimator.ofFloat(this, TWEEN_RADIUS, 1); tweenRadius.setAutoCancel(true); tweenRadius.setDuration(duration); - tweenRadius.setInterpolator(LINEAR_INTERPOLATOR); + tweenRadius.setInterpolator(DECELERATE_INTERPOLATOR); tweenRadius.setStartDelay(RIPPLE_ENTER_DELAY); final ObjectAnimator tweenOrigin = ObjectAnimator.ofFloat(this, TWEEN_ORIGIN, 1); tweenOrigin.setAutoCancel(true); tweenOrigin.setDuration(duration); - tweenOrigin.setInterpolator(LINEAR_INTERPOLATOR); + tweenOrigin.setInterpolator(DECELERATE_INTERPOLATOR); tweenOrigin.setStartDelay(RIPPLE_ENTER_DELAY); final ObjectAnimator opacity = ObjectAnimator.ofFloat(this, OPACITY, 1);