Code example for ActionBarActivity

Methods: finish

0
 
	@Override 
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
			case android.R.id.home:
				finish(); 
				break; 
			default: 
				break; 
		} 
		return true; 
	} 
 
	@Override 
	public boolean dispatchTouchEvent(MotionEvent ev) {
		mCompat.onTouchEvent(ev);
		return super.dispatchTouchEvent(ev);
	} 
}