Skip to content

Instantly share code, notes, and snippets.

@frcake
Created November 10, 2018 19:29
Show Gist options
  • Save frcake/f45bfe99e6b2d35e9df5e5a22b5cd2a2 to your computer and use it in GitHub Desktop.
Save frcake/f45bfe99e6b2d35e9df5e5a22b5cd2a2 to your computer and use it in GitHub Desktop.
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
if (getIntent().getExtras().getBoolean("SHOW_LOGIN")) {
fragmentTransaction.replace(R.id.main_fragment_container, new LoginFragment());
fragmentTransaction.commit();
}else{
fragmentTransaction.replace(R.id.main_fragment_container, new TourPackageFragment());
fragmentTransaction.commit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment