button_continue.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Transaction transaction = getSupportFragmentManager().beginTransaction(); ExampleFragment fragment = new ExampleFragment(); transaction.replace(R.id.container, fragment); //This R.id.container should be replaced for the id you have in your activity(If u want show me your xml of your parent Activity) transaction.addToBackStack(null); //If you want to add to the stack add this line transaction.commit(); } });