android 匀速旋转动画效果
2015-05-23 19:11
274 查看
在一个播放控件,上增加一个等待动画
LayoutParams mLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
//将新的ImageView添加到viewGroup当中
//mLayoutParams.addRule(verb, anchor)
mLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);
m_playWnd.addView(imageViewAdd, mLayoutParams);
// m_playWnd.add
AnimationSet animset = new AnimationSet(false);
RotateAnimation mrotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mrotate.setDuration(800);
//mrotate.setRepeatMode(repeatMode)
LinearInterpolator ddd = new LinearInterpolator();
mrotate.setInterpolator(ddd);
mrotate.setRepeatCount(10000);
mrotate.setFillAfter(true);
//LinearInterpolator lir = new LinearInterpolator();
// mrotate.setInterpolator(lir);
animset.addAnimation(mrotate);
imageViewAdd.startAnimation(animset);
LayoutParams mLayoutParams = new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
//将新的ImageView添加到viewGroup当中
//mLayoutParams.addRule(verb, anchor)
mLayoutParams.addRule(RelativeLayout.CENTER_IN_PARENT);
m_playWnd.addView(imageViewAdd, mLayoutParams);
// m_playWnd.add
AnimationSet animset = new AnimationSet(false);
RotateAnimation mrotate = new RotateAnimation(0, 360, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
mrotate.setDuration(800);
//mrotate.setRepeatMode(repeatMode)
LinearInterpolator ddd = new LinearInterpolator();
mrotate.setInterpolator(ddd);
mrotate.setRepeatCount(10000);
mrotate.setFillAfter(true);
//LinearInterpolator lir = new LinearInterpolator();
// mrotate.setInterpolator(lir);
animset.addAnimation(mrotate);
imageViewAdd.startAnimation(animset);
相关文章推荐
- Android之让图片匀速旋转效果
- Android酷炫动画效果之3D星体旋转效果
- android 视图动画的使用,Animation重写 实现旋转效果
- android 动画rotate实现图片不停旋转的效果
- Android 中 画图与动画旋转效果(中级)
- AndroidUI 视图动画-旋转动画效果 (RotateAnimation)
- Android UI:看看Google官方自定义带旋转动画的ImageView-----RotateImageView怎么写(附 图片淡入淡出效果)
- Android动画3D立体旋转,属性动画与View动画效果区别
- Android UI:看看Google官方自定义带旋转动画的ImageView-----RotateImageView怎么写(附 图片淡入淡出效果)
- android 实现控件的旋转动画效果
- AndroidUI 视图动画-旋转动画效果 (RotateAnimation)
- Android 动画之RotateAnimation应用详解(旋转动画效果 )(转载)
- AndroidUI 视图动画-旋转动画效果 (RotateAnimation)
- Android 3D旋转动画效果
- Android 3D旋转动画效果
- Android 3D旋转动画效果实现分解
- Android基础-简单的动画实现 *补间动画 *透明度渐变 *旋转动画 *位移动画 *如果需要几个效果整合到一起,需要将所有效果全部放到set里
- Android Tween动画之RotateAnimation实现图片不停旋转效果实例介绍
- Android UI:看看Google官方自定义带旋转动画的ImageView-----RotateImageView怎么写(附 图片淡入淡出效果)
- android 实现3D动画旋转效果