summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wei <markwei@google.com>2014-01-17 11:22:40 -0800
committerMark Wei <markwei@google.com>2014-01-17 11:22:40 -0800
commit4d404fe4edb0b5074ed9d3e90dd7aa942f252692 (patch)
tree2ddcc6ccf1f2b8321e83213f0b0d3d5a9bb304b1
parentad6ca3f895022ded1a11f3eedc50d70ea90cd4da (diff)
downloadbitmap-4d404fe4edb0b5074ed9d3e90dd7aa942f252692.tar.gz
Restore bounds when we recreate the placeholder and progress drawables.
Change-Id: I9b63360a2bd34355c87528d143139764ec9aec38
-rw-r--r--src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java b/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java
index 55b980a..6d9f05f 100644
--- a/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java
+++ b/src/com/android/bitmap/drawable/ExtendedBitmapDrawable.java
@@ -118,6 +118,7 @@ public class ExtendedBitmapDrawable extends BasicBitmapDrawable implements
mPlaceholder = new Placeholder(placeholder, mResources, placeholderWidth, placeholderHeight,
fadeOutDurationMs, mOpts);
mPlaceholder.setCallback(this);
+ mPlaceholder.setBounds(getBounds());
// Progress bar is optional.
if (mOpts.progressBar != null) {
@@ -125,6 +126,7 @@ public class ExtendedBitmapDrawable extends BasicBitmapDrawable implements
mProgress = new Progress(mOpts.progressBar.getConstantState().newDrawable(mResources), mResources,
progressBarSize, progressBarSize, fadeOutDurationMs, mOpts);
mProgress.setCallback(this);
+ mProgress.setBounds(getBounds());
} else {
mProgress = null;
}