- 在 drawable 目录下新建 frames.xml
1 |
|
- 在页面中调用 frames.xml
1 |
|
- 解析并开启动画
1 | public class MainActivity extends AppCompatActivity { |
- 下面是纯代码方式实现
1 | AnimationDrawable animationDrawable1 = new AnimationDrawable(); |
1 |
|
1 |
|
1 | public class MainActivity extends AppCompatActivity { |
1 | AnimationDrawable animationDrawable1 = new AnimationDrawable(); |
Update your browser to view this website correctly. Update my browser now