diff options
author | Chet Haase <chet@google.com> | 2013-03-20 16:14:56 -0700 |
---|---|---|
committer | Chet Haase <chet@google.com> | 2013-03-20 16:23:33 -0700 |
commit | 633326e29f008d2b86e523cfeedcbb2a0883181f (patch) | |
tree | a409f9b189e442d95c297d146942d0f5df5136b6 /graphics | |
parent | 63f1e2fb6b7102490b11523589b82c2101d3c079 (diff) | |
download | frameworks_base-633326e29f008d2b86e523cfeedcbb2a0883181f.zip frameworks_base-633326e29f008d2b86e523cfeedcbb2a0883181f.tar.gz frameworks_base-633326e29f008d2b86e523cfeedcbb2a0883181f.tar.bz2 |
Manage drawable invalidation automatically for Overlays
Drawables added to a view's Overlay will now cause the Overlay to
be invalidated via the normal drawable-invalidation mechanism. That is,
changes to any of the drawables in the overlay should cause invalidation of
the proper area of the overlay and thus the hostView, causing the appropriate
area to be redrawn.
Also, fixed a bug in drawable invalidation so that bounds changes will now
correctly invalidate both the old and new bounds areas.
Issue #8350510 Add APIs needed for future animation capabilities
Change-Id: Icae5fa0e420232ee17dc39be10084345bae8dbd8
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/Drawable.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/Drawable.java b/graphics/java/android/graphics/drawable/Drawable.java index 37f2250..c90f400 100644 --- a/graphics/java/android/graphics/drawable/Drawable.java +++ b/graphics/java/android/graphics/drawable/Drawable.java @@ -146,6 +146,10 @@ public abstract class Drawable { if (oldBounds.left != left || oldBounds.top != top || oldBounds.right != right || oldBounds.bottom != bottom) { + if (!oldBounds.isEmpty()) { + // first invalidate the previous bounds + invalidateSelf(); + } mBounds.set(left, top, right, bottom); onBoundsChange(mBounds); } |