android控件摆动、摇动、晃动效果实现
Animation animation = AnimationUtils.loadAnimation(context, R.anim.rotate);
v.startAnimation(animation);
rotate.xml
<?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" #可以是数字 现在状态永远摇摆
android:repeatMode="reverse"
android:toDegrees="5.0" />
上传个静态图片说明一下 就是可以按照线不停摆动