android Frame动画基础
16lz
2021-01-23
Frame动画是通过对多张系列帧图片的不停切换来达到视觉上的动画效果。
XML动画:
一:
<?xml version="1.0" encoding="uft-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
<item android:drawable="@drawable/img1" android:duration="150"/>
<item android:drawable="@drawable/img2" android:duration="150"/>
<item android:drawable="@drawable/img3" android:duration="150"/>
<animation-list />
二:
imageView img_frame;
AnimationDrawable loaclAnimation=null;
img_frame.setBackgroundResource(R.id.img_frame);
loaclAnimation=(AnimationDrawable)img_frame.getBackground();
loaclAnimation.start();
loaclAnimation.stop();
activity中:
更多相关文章
- Lottie动画
- Android 关于动画设置问题。
- android拾遗——Android 动画学习笔记
- Android 属性动画Property Animation(下)
- Android 动画效果 --Animation 动画专题研究
- Android Property Animation动画
- android开机动画启动流程
- Android动画之ViewAnimation和DrawableAnimation
- android中的逐帧动画