Code example for ActionBarDrawerToggle

Methods: supportInvalidateOptionsMenu

0
		 
		drawerToggle = new ActionBarDrawerToggle(
				getActivity(), drawer, R.drawable.ic_drawer,
				R.string.drawer_open, R.string.drawer_close) { 
			public void onDrawerClosed(View view) {
				supportInvalidateOptionsMenu(); 
				// creates call to onPrepareOptionsMenu() 
			} 
 
			public void onDrawerOpened(View drawerView) {
				supportInvalidateOptionsMenu(); 
				// creates call to onPrepareOptionsMenu() 
			} 
		}; 
		drawer.setDrawerListener(drawerToggle);
 
		FragmentManager fm = getSupportFragmentManager();
		fm.addOnBackStackChangedListener(this);
	} 
 
	/**