diff options
author | ztenghui <ztenghui@google.com> | 2014-09-23 10:58:57 -0700 |
---|---|---|
committer | ztenghui <ztenghui@google.com> | 2014-09-23 11:22:26 -0700 |
commit | dbcccffc3760f702887faa95b2748125bac88a89 (patch) | |
tree | d9231523830afc10f2695679b3613621bc8d3c3f | |
parent | fdb35f0526e63dc4d6882d86029d9beacc6a2d07 (diff) | |
download | frameworks_base-dbcccffc3760f702887faa95b2748125bac88a89.zip frameworks_base-dbcccffc3760f702887faa95b2748125bac88a89.tar.gz frameworks_base-dbcccffc3760f702887faa95b2748125bac88a89.tar.bz2 |
Fix animation on the some properties
The risk is low since most of them are just matching the naming to xml.
And this update won't cause build breakage.
b/17623982
Change-Id: I1eda0b8314ec7b94bc03976cdc365a7dc1039f4c
3 files changed, 39 insertions, 9 deletions
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java index ace5eab..bbb0b50 100644 --- a/graphics/java/android/graphics/drawable/VectorDrawable.java +++ b/graphics/java/android/graphics/drawable/VectorDrawable.java @@ -1456,12 +1456,12 @@ public class VectorDrawable extends Drawable { /* Setters and Getters, used by animator from AnimatedVectorDrawable. */ @SuppressWarnings("unused") - int getStroke() { + int getStrokeColor() { return mStrokeColor; } @SuppressWarnings("unused") - void setStroke(int strokeColor) { + void setStrokeColor(int strokeColor) { mStrokeColor = strokeColor; } @@ -1476,32 +1476,32 @@ public class VectorDrawable extends Drawable { } @SuppressWarnings("unused") - float getstrokeAlpha() { + float getStrokeAlpha() { return mStrokeAlpha; } @SuppressWarnings("unused") - void setstrokeAlpha(float strokeAlpha) { + void setStrokeAlpha(float strokeAlpha) { mStrokeAlpha = strokeAlpha; } @SuppressWarnings("unused") - int getFill() { + int getFillColor() { return mFillColor; } @SuppressWarnings("unused") - void setFill(int fillColor) { + void setFillColor(int fillColor) { mFillColor = fillColor; } @SuppressWarnings("unused") - float getfillAlpha() { + float getFillAlpha() { return mFillAlpha; } @SuppressWarnings("unused") - void setfillAlpha(float fillAlpha) { + void setFillAlpha(float fillAlpha) { mFillAlpha = fillAlpha; } diff --git a/tests/VectorDrawableTest/res/anim/animation_favorite.xml b/tests/VectorDrawableTest/res/anim/animation_favorite.xml index c81ba40..2e2d9bb 100644 --- a/tests/VectorDrawableTest/res/anim/animation_favorite.xml +++ b/tests/VectorDrawableTest/res/anim/animation_favorite.xml @@ -25,5 +25,35 @@ android:valueFrom="@string/round_box" android:valueTo="@string/heart" android:valueType="pathType" /> + <objectAnimator + android:duration="8000" + android:propertyName="fillAlpha" + android:repeatCount="-1" + android:valueFrom="1.0" + android:valueTo="0.0" /> + <objectAnimator + android:duration="8000" + android:propertyName="strokeAlpha" + android:repeatCount="-1" + android:valueFrom="1.0" + android:valueTo="0.0" /> + <objectAnimator + android:duration="8000" + android:propertyName="strokeColor" + android:repeatCount="-1" + android:valueFrom="#FF0000FF" + android:valueTo="#FF00FF00" /> + <objectAnimator + android:duration="8000" + android:propertyName="strokeWidth" + android:repeatCount="-1" + android:valueFrom="5" + android:valueTo="20" /> + <objectAnimator + android:duration="8000" + android:propertyName="fillColor" + android:repeatCount="-1" + android:valueFrom="#FFFF0000" + android:valueTo="#FF00FF00" /> </set>
\ No newline at end of file diff --git a/tests/VectorDrawableTest/res/anim/trim_path_animation02.xml b/tests/VectorDrawableTest/res/anim/trim_path_animation02.xml index 3bf2865..5d688cf 100644 --- a/tests/VectorDrawableTest/res/anim/trim_path_animation02.xml +++ b/tests/VectorDrawableTest/res/anim/trim_path_animation02.xml @@ -19,7 +19,7 @@ <objectAnimator android:duration="5000" - android:propertyName="fill" + android:propertyName="fillColor" android:valueFrom="#FF000000" android:valueTo="#FFFF0000"/> |