In the game I am currently programming, I have a tiled image with different animation frames in a 4x3 matrix. I would like to create an AnimationDrawable
consisting of each of these frames in sequence. However, I am only aware of making animations with entire images being frames. Can someone help me as to how 开发者_运维技巧to do this? If this could be done in XML, that's even better.
Thanks!
You can use Bitmap.createBitmap to create the clipped bitmaps from the big bitmap, and use AnimationDrawable.addFrame to add the bitmap to the AnimationDrawable.
精彩评论