florent37/ExpectAnim

How to detepminate that Anim is playing?

Kolyall opened this issue · 4 comments

How to determinate that Anim is playing?
Please add a method to get state of animation.
For example

ExpectAnim anim;
if (anim.isPlaying()){
 //do smth.
}
pcg92 commented

+1 I need a listener to know when the animation ends

@pcegarra it's already exist:

  new ExpectAnim()
                .expect(mPlayerMediaView)
                .toBe(
                        Expectations.invisible()
                )
                .toAnimation()
                .setDuration(500)
                .setStartListener(new AnimationStartListener() {
                    @Override
                    public void onAnimationStart(ExpectAnim expectAnim) {
                      //
                    }
                })
                .setEndListener(new AnimationEndListener() {
                    @Override
                    public void onAnimationEnd(ExpectAnim expectAnim) {
                    //
                    }
                })
                .start();

I need to know from another threads is anim.isPlaying() or not

I added isPlayingfor you on 1.0.5, can you try ?