Android SDK - Animation prevents further events on View like OnClick()
- by Ron
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