I have rotation animation that starts vertically and ends horizontally (90 degrees).
I need to make the animation stay horizontally until some button is pressed, but it just keeps going back to its vertical state
Click listeners:
holder.options.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
holder.options.startAnimation(AnimationUtils.loadAnimation(context,R.anim.rotate_right));
setMenuOptionsButton();
}}
The animation
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:fromDegrees="0"
android:toDegrees="90"
android:pivotX="50%"
android:pivotY="50%"
android:duration = "500"
android:fillAfter="true"
android:interpolator="@android:anim/linear_interpolator"
/>
I saw some solutions here and it didn't help me