public class MainActivity extends Activity {
/** Called when the activity is first created. */
ImageView TweenRotate;
Animation animation;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TweenRotate = (ImageView) findViewById(R.id.myImage);
TweenRotate.setImageResource(R.drawable.fan);
animation = AnimationUtils.loadAnimation(this, R.anim.rotate);
animation.setFillAfter(true);
TweenRotate.startAnimation(animation);
}
}
////////////////////////////////////////////////////////////////////
xml 부분
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/decelerate_interpolator">
<rotate
android:fromDegrees="0"
android:toDegrees="90"
android:toYScale="0.0"
android:pivotX="50%"
android:pivotY="50%"
android:duration="500"
/>
</set>
이상태에서 돌리니 한번 돌아가고끝나버리는데 계속적으로 돌려주려면 어떻게 해야되나여?