Loading graphics/java/android/graphics/drawable/RippleDrawable.java +7 −0 Original line number Diff line number Diff line Loading @@ -49,7 +49,9 @@ import android.graphics.RecordingCanvas; import android.graphics.Rect; import android.graphics.Shader; import android.os.Build; import android.os.Looper; import android.util.AttributeSet; import android.util.Log; import android.view.animation.AnimationUtils; import android.view.animation.LinearInterpolator; Loading Loading @@ -113,6 +115,7 @@ import java.util.Arrays; * @attr ref android.R.styleable#RippleDrawable_color */ public class RippleDrawable extends LayerDrawable { private static final String TAG = "RippleDrawable"; /** * Radius value that specifies the ripple radius should be computed based * on the size of the ripple's container. Loading Loading @@ -848,6 +851,10 @@ public class RippleDrawable extends LayerDrawable { private void startBackgroundAnimation() { mRunBackgroundAnimation = false; if (Looper.myLooper() == null) { Log.w(TAG, "Thread doesn't have a looper. Skipping animation."); return; } mBackgroundAnimation = ValueAnimator.ofFloat(mBackgroundOpacity, mTargetBackgroundOpacity); mBackgroundAnimation.setInterpolator(LINEAR_INTERPOLATOR); mBackgroundAnimation.setDuration(BACKGROUND_OPACITY_DURATION); Loading Loading
graphics/java/android/graphics/drawable/RippleDrawable.java +7 −0 Original line number Diff line number Diff line Loading @@ -49,7 +49,9 @@ import android.graphics.RecordingCanvas; import android.graphics.Rect; import android.graphics.Shader; import android.os.Build; import android.os.Looper; import android.util.AttributeSet; import android.util.Log; import android.view.animation.AnimationUtils; import android.view.animation.LinearInterpolator; Loading Loading @@ -113,6 +115,7 @@ import java.util.Arrays; * @attr ref android.R.styleable#RippleDrawable_color */ public class RippleDrawable extends LayerDrawable { private static final String TAG = "RippleDrawable"; /** * Radius value that specifies the ripple radius should be computed based * on the size of the ripple's container. Loading Loading @@ -848,6 +851,10 @@ public class RippleDrawable extends LayerDrawable { private void startBackgroundAnimation() { mRunBackgroundAnimation = false; if (Looper.myLooper() == null) { Log.w(TAG, "Thread doesn't have a looper. Skipping animation."); return; } mBackgroundAnimation = ValueAnimator.ofFloat(mBackgroundOpacity, mTargetBackgroundOpacity); mBackgroundAnimation.setInterpolator(LINEAR_INTERPOLATOR); mBackgroundAnimation.setDuration(BACKGROUND_OPACITY_DURATION); Loading