Code example for MenuItem

Methods: getItemId

0
        return true; 
    } 
 
    @Override 
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                NavUtils.navigateUpFromSameTask(this);
                return true; 
            case MENU_OVERFLOW:
                mMenuDrawer.toggleMenu();
                return true; 
        } 
        return super.onOptionsItemSelected(item);
    } 
 
    /** 
     * Click handler for top drawer items. 
     */ 
    @Override 
    public void onClick(View v) {