源码介绍:
本源代码是为了以较短的时间间隔连续显示一系列图片,帧图片要放在/res/drawable(frame1.png......framen.jpg)
创建一个 xml 文件(假设名称为 frame.xml)作为框架集,并将其放在 /res/drawable 下。这个 XML 文件实际上定义了 AnimationDrawable,一个类中的图像集合。您可以将此 Drawable 对象设置为 ImageView 的背景并让它播放。
(Source code introduction:
This source code is to continuously display a series of pictures in a short time interval. The frame pictures should be placed in / RES / drawable (frame1. PNG... Frames. JPG)
Create an XML file (assuming the name is frame. XML) as the framework set and put it under / RES / drawable. This XML file actually defines animationdrawable, a collection of images in a class. You can set this drawable object as the background of ImageView and let it play.)