How do I make a button switch to a new activity?
<p>I am trying to start a new activity using a button, but the new activity only shows for about five seconds and comes back. This is what my code looks like:</p>

<pre><code>public class Splash  extends Activity implements OnClickListener{
Button next, Previous, menu;
ViewFlipper vf;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.splash);

    next = (Button)findViewById(R.id.Button01);
    menu = (Button)findViewById(R.id.menu);
    Previous = (Button)findViewById(R.id.Button02);
    vf = (ViewFlipper)findViewById(R.id.ViewFlipper1); 

    next.setOnClickListener((OnClickListener) this);
    Previous.setOnClickListener((OnClickListener) this);

    menu.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              Intent intent = new Intent(Splash.this, Menu.class);
              startActivity(intent);
         }
   });        
   }

   public void onClick(View v) {
   // TODO Auto-generated method stub
   if(v==next){
      vf.showNext();
   }
   if(v==Previous){
        vf.showPrevious();
   }  
 }
}
</code></pre>

<p>This is the code for the Menu activity. It's incomplete, though:</p>

<pre><code>public class Menu extends AFFIRMATION implements OnClickListener{
Button about;
Button contact;
Button products;
Button cards;

//@override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.menu);

    about = (Button)findViewById(R.id.button1);
    contact = (Button)findViewById(R.id.button2);
    products = (Button)findViewById(R.id.button3);
     cards = (Button)findViewById(R.id.button4);



}


@Override
public void onClick(View arg0) {
    // TODO Auto-generated method stub

}
}
</code></pre>
