Android(安卓)Animation无限循环动画
16lz
2021-12-04
方法一:
①参考:http://blog.csdn.net/jiangwei0910410003/article/details/16985999
②anim中主要参数设置:
android:interpolator="@android:anim/linear_interpolator" android:repeatMode="restart" android:repeatCount="infinite"
方法二:
①Animation设置setAnimationListener(new ReStartAnimationListener())
②ReStartAnimationListener()具体实现
/** * 重复启动动画 */ private class ReStartAnimationListener implements Animation.AnimationListener { public void onAnimationEnd(Animation animation) { // TODO Auto-generated method stub animation.reset(); animation.setAnimationListener(new ReStartAnimationListener()); animation.start(); } public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } public void onAnimationStart(Animation animation) { // TODO Auto-generated method stub } }
更多相关文章
- android中颜色参考
- Android(安卓)安全性和权限
- Android(安卓)Animation无限循环动画
- ListView常用方法整理
- Android(安卓)SDK4.0离线快速安装方法
- Android实现TextView跑马灯效果
- android 一行两个按钮居中 布局
- Android(安卓)背景图片平铺
- android中Drawable方法详解