AndroidViewAnimations icon indicating copy to clipboard operation
AndroidViewAnimations copied to clipboard

delay() doesn't work on onAnimationStart()

Open liaoinstan opened this issue 7 years ago • 0 comments

YoYo.with(Techniques.FadeInDown) .duration(500) .delay(2000) .withListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { textView.setVisibility(View.VISIBLE); } ... }) .playOn(textView);

onAnimationStart() will be called immediately when I call playOn() so I have to fix it like this:

new Handler().postDelayed(new Runnable() { @Override public void run() { YoYo.with(Techniques.FadeInDown) .duration(500) .withListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { textView.setVisibility(View.VISIBLE); } ... }) .playOn(textView); } },2000);

liaoinstan avatar Jan 11 '18 03:01 liaoinstan