Reputation: 17
I would like to know, if there is a possibility to check if exact animation on button or textview has finished ? I have a problem with simple menu animations with 6 widgets (2 buttons, 2 edittexts, 2 textviews). I'm using AnimationListener but it works to all animations in the same time. Problem shows up when one "fadeIn" animation is called in different times. You can see that "fadeIn" AnimationListener is called two times (first time when "fadeOut" animation has started, and second time when it's gone).
Sequence should be like that: (1). registration_bt & login_bt -> fadeOut, (same time) email_tv & password_tv -> fadeIn (2). When registration_bt & login_b are gone, email_et & password_et -> fadeIn, (same time) email_tv & password_tv are visible. (3). email_et & email_tv & password_et & password_tv are visible.
Thanks for any advices! AnimationListener screen.
Upvotes: 2
Views: 50
Reputation: 4022
There is this way (from here): Will work but I would also like to see a better solution. GL
login_bt.animate().alpha(0).setDuration(2000).withEndAction(new Runnable() {
@Override
public void run() {
email_tv.animate().alpha(1).setDuration(2000).withEndAction(new Runnable() ...
}
});
Upvotes: 1