Getting menu clicks
<p>Alright, this might be simple but I dunno how to do it!  I have my menu defined through XML, as shown below.  It loads and everything.</p>

<pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:id="@+id/home"
          android:title="Home" /&gt;
    &lt;item android:id="@+id/about"
          android:title="About" /&gt;
    &lt;item android:id="@+id/quit"
          android:title="Quit" /&gt;
&lt;/menu&gt;
</code></pre>

<p>Now, going through <code>onOptionsItemSelected()</code>, how do I tell which menu item is selected?</p>

<p>This is from an example... What would the case's be?</p>

<pre><code>public boolean onOptionsItemSelected(MenuItem item) {
    switch (item.getItemId()) {
    case 1:
        Toast.makeText(this, "Home", Toast.LENGTH_LONG).show();
        return true;
    case 2:
        Toast.makeText(this, "About", Toast.LENGTH_LONG).show();
        return true;
    case 3:
        Toast.makeText(this, "Quit", Toast.LENGTH_LONG).show();
        return true;
    }
    return false;
}
</code></pre>
