Code example for ActionBarActivity

Methods: onOptionsItemSelected

0
            return true; 
        } 
        // Handle action buttons 
        switch (item.getItemId()) {
            default: 
                return super.onOptionsItemSelected(item);
        } 
    } 
 
 
    // FOR SETTING UP TABS IN ViewPagerTabsFragment 
    @Override 
    public ActionBar getActivityActionBar() {
        return getSupportActionBar(); 
    } 
 
    /* The click listner for ListView in the navigation drawer */ 
    private class DrawerItemClickListener implements ListView.OnItemClickListener {
        @Override 
        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
            selectItem(position);