Translate ripple mask to account for drawable bounds

Bug: 23354529
Change-Id: Iaa4fde6b37645492cf902f141f975bdef8e7e14e
This commit is contained in:
Alan Viverette
2015-08-20 16:27:21 -04:00
parent e3de6c5df5
commit f0d69b9e33

View File

@@ -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);
}