I need this button, to wait with proccesing to another activity (secondclas), for the time of the animation (out1). How to code it?
button1.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
image1.startAnimation(out1);
Intent Intent = new Intent(view.getContext(), secondclass.class);
startActivityForResult(Intent, 0);
}
}) ;
Take a look at Animation.AnimationListener(). You can implement the onAnimationEnd(…) method and launch the new activity there.