Tell me how to set the time for the transition to the next Activity. I will explain for what. Assigned animation to a button that lasts 3 seconds. This button translates to another activation. But since the transition takes place immediately, the animation is not visible. Here is the code:
@Override public void onClick(View v){ Animation anim = null; switch (v.getId()){ case R.id.startPlayBtn: anim = AnimationUtils.loadAnimation(this, R.anim.myrotate); Intent intent = new Intent (this, ChooseLvl.class); startActivity(intent); break; default: break; } startPlayBtn.startAnimation(anim); }