Code example for ActionBarActivity

Methods: onOptionsItemSelected

0
			// http://developer.android.com/design/patterns/navigation.html#up-vs-back 
			// 
			NavUtils.navigateUpTo(this, new Intent(this, ConversationListActivity.class));
			return true; 
		} 
		return super.onOptionsItemSelected(item);
	} 
 
	@TargetApi(19) 
	@Override 
	public void onConfigurationChanged(Configuration newConfig) {
		super.onConfigurationChanged(newConfig);
		if (newConfig.orientation != Configuration.ORIENTATION_PORTRAIT) {
			MessageListFragment messagesFragment = (MessageListFragment) getSupportFragmentManager().findFragmentById(
					R.id.conversation_detail_container); 
			Intent intent = new Intent(this, ConversationListActivity.class);
			Bundle args = messagesFragment.getArguments();
			intent.putExtra(TextBasedSmsColumns.THREAD_ID, args.getLong(TextBasedSmsColumns.THREAD_ID, Conversation.INVALID_THREAD_ID));
			NavUtils.navigateUpTo(this, intent);
		}