开发者

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 Drawables. If you implement the animation this way, it is as easy as creating a getter/setter method to make the speed changeable.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜