daimajia / daimajia/AndroidViewAnimations
delay() doesn't work on onAnimationStart()
- Dominant language
- Java
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
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);
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.