Code example for FragmentActivity

Methods: getActionBar

0
 
		// Set up the dropdown list navigation in the action bar. 
		actionBar.setListNavigationCallbacks(adapter, this);
 
		// Use getActionBar().getThemedContext() to ensure 
		// that the text color is always appropriate for the action bar 
		// background rather than the activity background. 
	} 
 
	@Override 
	public void onRestoreInstanceState(Bundle savedInstanceState) {
		// Restore the previously serialized current dropdown position. 
		if (savedInstanceState.containsKey(STATE_SELECTED_NAVIGATION_ITEM)) {
			getActionBar().setSelectedNavigationItem( 
					savedInstanceState.getInt(STATE_SELECTED_NAVIGATION_ITEM));
		} 
	} 
 
	@Override 
	public void onSaveInstanceState(Bundle outState) {
		// Serialize the current dropdown position.