Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void animateTextView(float initialValue, float finalValue, final TextView textview) {
- ValueAnimator valueAnimator = ValueAnimator.ofFloat(initialValue, finalValue);
- valueAnimator.setDuration(1500);
- valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
- @Override
- public void onAnimationUpdate(ValueAnimator valueAnimator) {
- textview.setText(valueAnimator.getAnimatedValue().toString());
- }
- });
- valueAnimator.start();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement