Can I Make A Duration Variable In Frame to Frame Animation xml?
I have several Frame-to-Frame XML Animations that use the android:duration to set the speed. All work well.
Is it possible to use a variable f开发者_如何学JAVAor this so I can change the values per user needs in code (using API 1.6).
The Frame Animation is less cumbersome than coding animation (and I already have 20 of them so I'd prefer a clever variable approach in XML).
Thanks
Personally I found the animation XML too rigid, so I wrote an AnimatedSprite
class that handed animations by looping through an ArrayList
of Drawable
s. If you implement the animation this way, it is as easy as creating a getter/setter method to make the speed changeable.
精彩评论