Merge "Translate ripple mask to account for drawable bounds" into mnc-dev

This commit is contained in:
Alan Viverette
2015-08-20 20:31:27 +00:00
committed by Android (Google) Code Review

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