I have a button widget that I had a successful rotation animation on but then it just goes back to the original position. How do I get it to stop?
Here is my xml rotate:
<?xml version="1.0" encoding="UTF-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="90"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="0"
android:duration="1200" />
and my java:
Button tx = (Button)v;
tx.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotateit));
Use
android:fillAfter="true"andandroid:fillEnabled="true"Check the Animation xml specifications:
http://developer.android.com/reference/android/view/animation/Animation.html