I want to make a little fresh icon.
When I click on it, I want it to spin like a progress dialog, until my refresh is completed, then it must stop spinning.
How can I achieve this?
I tried with an animation like so:
RotateAnimation rotateAnimation = new RotateAnimation(30, 90,
Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
refreshBtn.startAnimation(rotateAnimation);
but that only rotates once or twice and then stops.