I have an animationDrawable that has a list of frames (one by one) to display them as an animation.
The problem is that I want that drawable to be rotated 45 degree. Is there a way to rotate it before so the animation plays on a diagonal?
Thank you
Here is a XML animation
<animation-list android:id="@+id/selected" android:oneshot="false">
<item android:drawable="@drawable/imag1" android:duration="150" />
<item android:drawable="@drawable/imag2" android:duration="150" />
<item android:drawable="@drawable/imag3" android:duration="150" />
</animation-list>
and here is the code
ImageView img = (ImageView)findViewById(R.id.spinning_wheel_image);
img.setBackgroundResource(R.drawable.spin_animation);
//I want to rotate here
AnimationDrawable frameAnimation = (AnimationDrawable) img.getBackground();
frameAnimation.start();