title: android button animation. How to get animation first, on click before activity
body: <p>I made a button for Android that rotates on click, but when I set a button and new activity, when I click it's just set me to new activity.</p>
  
  <p>I need just this: when I click on that button, first to do animation e.g. rotate, then to execute a new activity.  Here is my code:</p>
  
  <pre><code>ImageButton pandaButton2 = (ImageButton) findViewById(R.id.pandaButton2);
  
     pandaButton2.setOnClickListener(new OnClickListener(){
         public void onClick(View v){
             v.startAnimation(pandarotate);
              startActivity(new Intent("com.example.threepandas.MENU"));
  }
  });
  </code></pre>