Answer the question
In order to leave comments, you need to log in
How to make a piece of java code "sleep" (android programming)?
I have a button that, when clicked, calls the call () function, the contents of the function:
Animation anim = null;
anim = AnimationUtils.loadAnimation(this, R.anim.myanim);
Button an;
an = (Button) findViewById(R.id.an);
an.startAnimation(anim);
Intent intent = new Intent(this, Main2Activity.class);
startActivity(intent);
Answer the question
In order to leave comments, you need to log in
In the case of animation, it's better to use setAnimationListener.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question