EDIT: This question was for the deprecated sherlock action bar. Android support library should be used instead now
I have added an action bar menu o
Edit for actionbar sherlock use
I had to use
public boolean onMenuItemSelected(int featureId, MenuItem item) {
in the main activity to capture the menu item