Code example for ActionBarDrawerToggle

Methods: getSupportActionBar, supportInvalidateOptionsMenu

0
				R.drawable.ic_drawer, R.string.drawer_open, 
				R.string.drawer_close) { 
 
			// THESE METHODS CALL onPrepareOptionsMenu() 
			public void onDrawerClosed(View view) {
				getSupportActionBar().setTitle(mTitle);
				supportInvalidateOptionsMenu(); 
			} 
 
			public void onDrawerOpened(View drawerView) {
				getSupportActionBar().setTitle(mDrawerTitle);
				supportInvalidateOptionsMenu(); 
			} 
		}; 
		mDrawerLayout.setDrawerListener(mDrawerToggle);
 
		// DEFAULT FOR ACTIVITY START 
		if (savedInstanceState == null) {
			selectItem(0); 
		} 
	}