Last active
December 13, 2017 12:39
-
-
Save romandanylyk/28f2dd9540ff6a00e7abdd3f8eaf4ce0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| PropertyValuesHolder propertyRadius = PropertyValuesHolder.ofInt(PROPERTY_RADIUS, 0, 150); | |
| PropertyValuesHolder propertyRotate = PropertyValuesHolder.ofInt(PROPERTY_ROTATE, 0, 360); | |
| animator = new ValueAnimator(); | |
| animator.setValues(propertyRadius, propertyRotate); | |
| animator.setDuration(2000); | |
| animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { | |
| @Override | |
| public void onAnimationUpdate(ValueAnimator animation) { | |
| radius = (int) animation.getAnimatedValue(PROPERTY_RADIUS); | |
| rotate = (int) animation.getAnimatedValue(PROPERTY_ROTATE); | |
| invalidate(); | |
| } | |
| }); | |
| animator.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment