android - Cannot set visibility after using ObjectAnimator -


i using nineoldandroids animations. trying achieve apply animation button before hiding it. so, apply animations button , call setvisibility(view.gone), seems it's not taking effect. button still on screen , handles clicks. should 'reset' somehow button state after applying animations?

    final button button = (button) getview().findviewbyid(r.id.user_to_button);     button.setonclicklistener(new view.onclicklistener() {         @override         public void onclick(view v) {             objectanimator.offloat(animatorproxy.wrap(v), "alpha", 1, 0).setduration(100).start();             objectanimator.offloat(animatorproxy.wrap(v), "translationx", 0, -v.getwidth()).setduration(100).start();             v.setvisibility(view.gone);         }     }); 

if remove animations works expected - hides button.

use before setvisibility after animation completed:

anim.reverse();         anim.removealllisteners();         anim.end();         anim.cancel(); 

where anim objectanimator


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -