Code example for ActionBarActivity

Methods: onConfigurationChanged

0
        mDrawerToggle.syncState();
    } 
 
    @Override 
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        // Pass any configuration change to the drawer toggls 
        mDrawerToggle.onConfigurationChanged(newConfig);
    } 
 
    private void selectItem( int pos ) {
        final FragmentManager fragmentManager = getSupportFragmentManager();
 
        if ( pos == 0 ) {
            final Fragment photoFragment = new PhotoFragment();
            fragmentManager.beginTransaction().replace(R.id.content_frame, photoFragment).commit();
        } else if ( pos == 1 ) {
 
        } 
    } 
}