开发者

How to draw a frame by frame Animation from frame x to frame y

I want to know if there is any solution available in Android that will allow me to define an Animation by entering a set of frames to it (images), And then allow me to play from frame number x to y.

I'm currently using AnimationDrawable for frame by frame animations and it seems to lack th开发者_StackOverflow社区at functionality.

Is there maybe a different Class that could help me here?

Thanks a lot!

Ita


You can add frames x through y to a new AnimationDrawable using addFrame(Drawable frame, int duration). Since you mentioned images, you should use a BitmapDrawable to load your images and then pass it to the AnimationDrawable along with the duration.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜