Code example for FragmentManager

Methods: popBackStack

0
	@Override 
	public void onBackPressed() { 
		// TODO Auto-generated method stub 
 
		FragmentManager fragmentManager = getSupportFragmentManager();
		fragmentManager.popBackStack();
		super.onBackPressed(); 
	} 
 
	// ---------Called when user pressed login--------------------// 
	private void login_out(Context context) {
		dialog = new Dialog(context);
		dialog.setTitle("User Login");
		dialog.setContentView(R.layout.login_pos);
		dialog.setCancelable(false);
		final EditText epass = (EditText) dialog.findViewById(R.id.loginpass);
		final EditText ename = (EditText) dialog
				.findViewById(R.id.loginusername);
		// ------------save pass----------------------// 
		final CheckBox cbSavePass = (CheckBox) dialog
Contextual code suggestions in your IDE  Get Codota for Java