Code example for FragmentActivity

Methods: onOptionsItemSelected

0
        return mActivityHelper.onCreateOptionsMenu(menu) || super.onCreateOptionsMenu(menu);
    } 
 
    @Override 
    public boolean onOptionsItemSelected(MenuItem item) {
        return mActivityHelper.onOptionsItemSelected(item) || super.onOptionsItemSelected(item);
    } 
 
    /** 
     * Returns the {@link ActivityHelper} object associated with this activity. 
     */ 
    protected ActivityHelper getActivityHelper() { 
        return mActivityHelper;
    } 
 
    /** 
     * Takes a given intent and either starts a new activity to handle it (the default behavior), 
     * or creates/updates a fragment (in the case of a multi-pane activity) that can handle the 
     * intent. 
     * 
     * Must be called from the main (UI) thread.