旋转动画
[html]
rotate_and_scale.xml
[html] view plaincopy
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate android:fromDegrees="0" android:toDegrees="360"
android:pivotX="50%" android:pivotY="50%"
android:duration="5000"
android:repeatMode="restart"
android:repeatCount="infinite" />
</set>
[java]
www.zzzyk.com
final ImageView img1=(ImageView)this.findViewById(R.id.imageView1);
Button btn=(Button)this.findViewById(R.id.button1);
final Animation mRotateAnim= AnimationUtils.loadAnimation(this, R.anim.rotate_and_scale);
btn.setOnClickListener(new OnClickListener() {
<span style="white-space:pre"> </span>@Override
public void onClick(View v) {
img1.setAnimation(mRotateAnim);
}
});
作者:kechanghe0705
补充:web前端 , HTML 5 ,