From 0128fe88bcfc99cfc9184735cfc70201e8858928 Mon Sep 17 00:00:00 2001 From: Yuya Tanaka Date: Mon, 8 Aug 2016 18:22:41 +0900 Subject: [PATCH] Fix NoSuchMethodError on super.getDirtyBounds() RippleDrawable#getDirtyBounds() calls super. --- .../graphics/drawables/LollipopDrawable.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/app/src/main/java/codetail/graphics/drawables/LollipopDrawable.java b/app/src/main/java/codetail/graphics/drawables/LollipopDrawable.java index 5fb57a3..aa7c87a 100644 --- a/app/src/main/java/codetail/graphics/drawables/LollipopDrawable.java +++ b/app/src/main/java/codetail/graphics/drawables/LollipopDrawable.java @@ -20,6 +20,20 @@ public abstract class LollipopDrawable extends Drawable { private ColorFilter mColorFilter; + /** + * Return the drawable's dirty bounds Rect. Note: for efficiency, the + * returned object may be the same object stored in the drawable (though + * this is not guaranteed). + *

+ * By default, this returns the full drawable bounds. Custom drawables may + * override this method to perform more precise invalidation. + * + * @return The dirty bounds of this drawable + */ + public Rect getDirtyBounds() { + return getBounds(); + } + /** * Inflate this Drawable from an XML resource optionally styled by a theme. *