I have a circular layout and there are "n" buttons in this layout. I start the animation on that layout when the activity starts.
When I click on any button the animation should stop and a dialog appear with the message, "You have clicked this 'XYZ' button".
The code I am using:
animation = AnimationUtils.loadAnimation(this, R.anim.rotate);
animation.setFillEnabled(true);
animation.setFillAfter(true);
findViewById(R.id.circle_layout).startAnimation(animation);
and the animation XML:
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="15000"
android:fromDegrees="0"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="infinite"
android:toDegrees="360" >