Code example for ActionBarActivity

Methods: onConfigurationChanged

0
        mDrawerToggle.syncState();
    } 
 
    @Override 
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        mDrawerToggle.onConfigurationChanged(newConfig);
    } 
 
	@Override 
	public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
		if (position == 0) {
	        FragmentTransaction ft = mFM.beginTransaction();
	        MainFragment fragment = new MainFragment();
	        ft.add(R.id.content_frame, fragment);
	        ft.commit();
		} else if (position == 1) {
	        FragmentTransaction ft = mFM.beginTransaction();
	        MapFragment fragment = new MapFragment();
	        ft.add(R.id.content_frame, fragment);
	        ft.commit();