title: Android eclipse how to start a new activity on button click
body: <p>I am trying to make it so that when the user presses a button on the default activity, it opens a new activity.</p>
  
  <p>Here's what I've got.</p>
  
  <p>The code for the button:</p>
  
  <pre><code>android:onClick="openmenu"
  </code></pre>
  
  <p>The code for the "openmenu" method:</p>
  
  <pre><code>public void openmenu(View view) {
      Intent intent = new Intent(this , MainMenuPassed.class);
      startActivity(intent);
  } 
  </code></pre>
  
  <p>Cheers guys!</p>