title: Android Create a simple menu programmatically
body: <p>I'm trying to create a simple menu with one button that will call a method to clear the array. I don't want to use xml because all I need is one button.</p>
  
  <p>Something like this -</p>
  
  <pre><code>public boolean onCreateOptionsMenu(Menu menu) {
      button "Clear Array";
      onClick{// run method that wipes array};
      return true;
  }
  </code></pre>
  
  <p>Thank you</p>