[java] view plaincopy
- Animation animation = AnimationUtils.loadAnimation(context, R.anim.rotate);
- v.startAnimation(animation);
rotate.xml
[html] view plaincopy
- <?xml version=”1.0″ encoding=”utf-8″?>
- <rotate xmlns:android=”http://schemas.android.com/apk/res/android”
- android:duration=”300″
- android:fromDegrees=”-5.0″
- android:pivotX=”50.0%”
- android:pivotY=”0%”
- android:repeatCount=”infinite” <span class=”s1″>#</span>可以是数字<span class=”s1″> </span>现在状态永远摇摆
- android:repeatMode=”reverse”
- android:toDegrees=”5.0″ />
上传个静态图片说明一下 就是可以按照线不停摆动