diff options
-rw-r--r-- | graphics/java/android/graphics/drawable/RippleDrawable.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java index 32f6a89..464f3de 100644 --- a/graphics/java/android/graphics/drawable/RippleDrawable.java +++ b/graphics/java/android/graphics/drawable/RippleDrawable.java @@ -855,7 +855,8 @@ public class RippleDrawable extends LayerDrawable { // Position the shader to account for canvas translation. if (mMaskShader != null) { - mMaskMatrix.setTranslate(-x, -y); + final Rect bounds = getBounds(); + mMaskMatrix.setTranslate(bounds.left - x, bounds.top - y); mMaskShader.setLocalMatrix(mMaskMatrix); } |