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. *