Last active
January 11, 2021 00:11
-
-
Save thrashedbrain/bba20d592d73fa676a78a3394411694d 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
ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder( | |
container, | |
PropertyValuesHolder.ofFloat("scaleX", 0.5f), | |
PropertyValuesHolder.ofFloat("scaleY", 0.5f) | |
); | |
animator.setDuration(300); | |
animator.setRepeatCount(ObjectAnimator.RESTART); | |
animator.setRepeatMode(ObjectAnimator.REVERSE); | |
animator.setInterpolator(new FastOutSlowInInterpolator()); | |
animator.start(); |
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
// loadImg is instance of ImageView | |
ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder( | |
loadImg, | |
PropertyValuesHolder.ofFloat("scaleX", 0.8f), | |
PropertyValuesHolder.ofFloat("scaleY", 0.8f) | |
); | |
animator.setDuration(300); | |
animator.setRepeatCount(ObjectAnimator.INFINITE); | |
animator.setRepeatMode(ObjectAnimator.REVERSE); | |
animator.setInterpolator(new FastOutSlowInInterpolator()); | |
animator.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment