Android SDK - Animation prevents further events on View like OnClick()

Posted by Ron on Stack Overflow See other posts from Stack Overflow or by Ron
Published on 2012-11-12T16:41:14Z Indexed on 2012/11/12 16:59 UTC
Read the original article Hit count: 426

I have an ImageView which is animated via startAnimation() to slide it into the screen. It is visible and enabled in the XML. When I add a Handler for a delay or an onClick event, nothing happens. When I remove the startAnimation() everything works fine. Except the animation of course.

Heres my code:

balloon.setOnClickListener(new OnClickListener() {
   @Override
    public void onClick(View view) {
       view.setVisibility(View.GONE);
    }
});

Animation dropDown = 
   AnimationUtils.loadAnimation(context, R.anim.balloon_slide_down);
dropDown.setStartOffset(1500);

balloon.startAnimation(dropDown);

Any ideas why that is? I'm quite frustrated by now...

Thanks,

Ron

© Stack Overflow or respective owner

Related posts about android

Related posts about android-animation