(Newbie's problem) The snippet of my code looks like:
RotateAnimation rotateAnimation= (RotateAnimation) AnimationUtils
.loadAnimation(MainActivity.this,R.anim.clockwise_anim);
and the clockwise_anim.xml located in res/anim looks like:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="5000" >
</rotate>
</set>
and I've got an error excactly on this snippet above: java.lang.ClassCastException:
android.view.animation.AnimationSet cannot be cast to android.view.animation.RotateAnimation
I saw such code many times and I don't get what goes wrong in my case. Any suggestion? Thanks in advance!