diff options
author | Romain Guy <romainguy@google.com> | 2011-04-26 11:50:17 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-04-26 11:50:17 -0700 |
commit | e1c6ff4b91072a4071589938c74dd65d66f88fb5 (patch) | |
tree | e2b743c63224a4038bbb1d598728680fffba8a0d /graphics/java | |
parent | ee6d5cfdff475f6c1119f060b139bdc1b621fa8b (diff) | |
download | frameworks_base-e1c6ff4b91072a4071589938c74dd65d66f88fb5.zip frameworks_base-e1c6ff4b91072a4071589938c74dd65d66f88fb5.tar.gz frameworks_base-e1c6ff4b91072a4071589938c74dd65d66f88fb5.tar.bz2 |
Make setGradientCenter/Radius work.
The previous implementation would not rebuild the gradient shader
when programmatically changing the shader's properties. Also fixes
the documentation since the gradient center does affect linear
gradients.
Change-Id: I5387188484b862f6835b0da9042b25032e55e792
Diffstat (limited to 'graphics/java')
-rw-r--r-- | graphics/java/android/graphics/drawable/GradientDrawable.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java index 7adea06..de0fabc 100644 --- a/graphics/java/android/graphics/drawable/GradientDrawable.java +++ b/graphics/java/android/graphics/drawable/GradientDrawable.java @@ -240,16 +240,19 @@ public class GradientDrawable extends Drawable { public void setGradientCenter(float x, float y) { mGradientState.setGradientCenter(x, y); + mRectIsDirty = true; invalidateSelf(); } public void setGradientRadius(float gradientRadius) { mGradientState.setGradientRadius(gradientRadius); + mRectIsDirty = true; invalidateSelf(); } public void setUseLevel(boolean useLevel) { mGradientState.mUseLevel = useLevel; + mRectIsDirty = true; invalidateSelf(); } |