I am using following code,
<ImageView
android:id="@+id/imgView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/animate"/>
My animate.xml is,
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:pivotX="50%"
android:pivotY="50%"
android:fromDegrees="90"
android:toDegrees="90"
android:repeatCount="infinite"
android:drawable="@drawable/cameras">
And in java to start it,
ImageView imgView=(ImageView)findViewById(R.id.imgView);
Animation rotation = AnimationUtils.loadAnimation(this, R.drawable.animate);
imgView.startAnimation(rotation);
But still my ImageView is not rotating,
I have seen many examples, but none of them are working.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…