Created
July 29, 2020 08:48
-
-
Save minhazmiraz/7f559b7db99ecedada436c0cc1c39d00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void onRefreshButtonClicked(final View view){ | |
RotateAnimation rotate = new RotateAnimation( | |
0, 355, | |
Animation.RELATIVE_TO_SELF, 0.5f, | |
Animation.RELATIVE_TO_SELF, 0.5f | |
); | |
rotate.setDuration(400); | |
rotate.setInterpolator(new LinearInterpolator()); | |
rotate.setRepeatCount(300); | |
rotate.setAnimationListener(new Animation.AnimationListener() { | |
@Override | |
public void onAnimationStart(Animation animation) { | |
view.setEnabled(false); | |
} | |
@Override | |
public void onAnimationEnd(Animation animation) { | |
view.setEnabled(true); | |
} | |
@Override | |
public void onAnimationRepeat(Animation animation) { | |
} | |
}); | |
view.startAnimation(rotate); | |
} |
Author
minhazmiraz
commented
Jul 29, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment