< ?xml version="1.0" encoding="utf-8"?> < set xmlns:android="http://schemas.android.com/apk/res/android"> < rotate android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:fromDegrees="0" android:toDegrees="+360" android:duration="3000" /> < !-- rotate 旋转动画效果 interpolator 指定一个动画的插入器,用来控制动画的速度变化 fromDegrees 属性为动画起始时物件的角度 toDegrees 属性为动画结束时物件旋转的角度,+代表顺时针 duration 属性为动画持续时间,以毫秒为单位 --> < /set> public class TestAnimation extends Activity implements OnClickListener{ public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button btn = (Button)findViewById(R.id.Button01); btn.setOnClickListener(this); } @Override public void onClick(View v) { Animation anim = AnimationUtils.loadAnimation(this, R.anim.my_rotate_action); findViewById(R.id.TextView01).startAnimation(anim); } }

更多相关文章

  1. ListView的一些属性设置
  2. (收集)ListView中常用属性
  3. [Android] Android Tweened Animations动画使用详解二
  4. Android控件属性大全[整理]
  5. 动画学习笔记-Android Animation
  6. Android编程示例之——横竖屏切换动画
  7. Android 同时播放缩放动画和位移动画 时, 位移的路径会发生偏移.
  8. [置顶] Android ViewPager+Fragment超高仿微信主界面(带底部图标

随机推荐

  1. linux下 在Android工程中查看framework j
  2. 【Android】将Xamarin For VS升级为4.0.1
  3. apk之间资源共享
  4. android 实现图片选择拖拽控件
  5. Android(安卓)4.4 Kit Kat 源码下载
  6. Android(安卓)NestedScrollView嵌套Recyc
  7. Android的动画简单学习
  8. [android]android自动化测试四之Monkey与
  9. Android(安卓)数据传递-通过Intent传递数
  10. android 事件传递机制 【转】