onPrepareOptionsMenu android app
<p>I am trying to use the onPrepareOptionsMenu and when I press the menu, it does nothing!! Where am I going wrong?</p>

<p>Also, am I using the finish (); command right? When the user presses exit(menuX) I want them to exit the application completely, not the activity.</p>

<p>Thanks! :)</p>

<pre><code>public boolean onCreateOptionsMenu(Menu menu){
super.onCreateOptionsMenu(menu);
MenuInflater getItnow = getMenuInflater();
getItnow.inflate(R.menu.main_menu, menu);
return true;
}

public boolean onPrepareOptionsMenu(MenuItem item){
    switch (item.getItemId()){
    case R.id.menuA:
        startActivity(new Intent("com.abc.example.A"));
        return true;
    case R.id.menuB:
        startActivity(new Intent("com.abc.example.B"));
        return true;
    case R.id.menuC:
        startActivity(new Intent("com.abc.example.C"));
        return true;
    case R.id.menuD:
        startActivity(new Intent("com.abc.example.D"));
    case R.id.menuX:
        finish();
    }
    return false;
}
}
</code></pre>
