summaryrefslogtreecommitdiffstats
path: root/graphics/java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2011-09-12 14:21:46 -0700
committerChet Haase <chet@google.com>2011-09-12 14:21:46 -0700
commite5cdb6c8394e321266fb8940fdd0c97b2f87b2f3 (patch)
tree109ea7b5610466bcf5b187de47fc3b7c8806154b /graphics/java
parent92bda84b11ba2aec98036313784444d9f5aebc9a (diff)
downloadframeworks_base-e5cdb6c8394e321266fb8940fdd0c97b2f87b2f3.zip
frameworks_base-e5cdb6c8394e321266fb8940fdd0c97b2f87b2f3.tar.gz
frameworks_base-e5cdb6c8394e321266fb8940fdd0c97b2f87b2f3.tar.bz2
Fix wobbly spinners
Some progress bars use AnimatedRotateDrawable, which suffered from the same bug as AnimationDrawable (until a recent fix). The code would not account for the left/top offset of the drawable in its view, so it would rotate the drawable around the wrong center, causing it to wobble and not get erased properly. Change-Id: I3f34f797e595973d9eb1d952d92026c769c7ec0a
Diffstat (limited to 'graphics/java')
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java b/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java
index 7c4e147..34f9070 100644
--- a/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedRotateDrawable.java
@@ -79,7 +79,7 @@ public class AnimatedRotateDrawable extends Drawable implements Drawable.Callbac
float px = st.mPivotXRel ? (w * st.mPivotX) : st.mPivotX;
float py = st.mPivotYRel ? (h * st.mPivotY) : st.mPivotY;
- canvas.rotate(mCurrentDegrees, px, py);
+ canvas.rotate(mCurrentDegrees, px + bounds.left, py + bounds.top);
drawable.draw(canvas);