Code example for ActionBarActivity

Methods: onOptionsItemSelected

0
                mDrawerLayout.closeDrawer(mDrawerList);
            } else { 
                mDrawerLayout.openDrawer(mDrawerList);
            } 
        } 
        return super.onOptionsItemSelected(item);
    } 
 
    private void selectItem(int position) {
        // update the main content by replacing fragments 
 
        Fragment fragment = new EpisodeListFragment();
        Bundle args = new Bundle();
        String afeed = audioFeedTable.get(shows[position]);
        String vfeed = videoFeedTable.get(shows[position]);
        args.putInt("SHOW_ID", position);
        args.putString("SHOW_AUDIO", afeed);
        args.putString("SHOW_VIDEO", vfeed);
        args.putString("SHOW_NAME", shows[position]);
        fragment.setArguments(args);
Connect your IDE to all the code out there  Get Codota for Java