Why view animation is not gone

Paradash Kangeri

I am new in Android. I created ripple animation to hide view, but view do not gone.

Animator anim = ViewAnimationUtils.createCircularReveal(view, 150, 150, 200f, 0f);
anim.start();

I expect that view gone after animation is end.

Matthew Strukov

First of all, the right name for this animation is circular reveal. You should add the listener to your animation and override method named as onAnimationEnd, then start an animation. In the onAnimationEnd you should set visibility to the view.

Animator anim = ViewAnimationUtils.createCircularReveal(view, 150, 150, 200f, 0f);

anim.addListener(new AnimatorListenerAdapter() {
    @Override
    public void onAnimationEnd(Animator animation) {
        view.setVisibility(View.INVISIBLE);
    }
});

anim.start();

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related