Skip to content

Instantly share code, notes, and snippets.

@jamesmontemagno
Created December 6, 2017 16:38
Show Gist options
  • Save jamesmontemagno/c945fb4629bbc73e83e2c64d40549993 to your computer and use it in GitHub Desktop.
Save jamesmontemagno/c945fb4629bbc73e83e2c64d40549993 to your computer and use it in GitHub Desktop.
import hellosharedui.droid.UIHelpers;
try {
UIHelpers helpers = new UIHelpers();
Fragment frag = helpers.getMyPageFragment(MainActivity.this);
FragmentManager manager = getSupportFragmentManager();
manager.beginTransaction().replace(R.id.fragment, frag, "main").commit();
}
catch(Throwable ex) {
Log.d("MainActivity", "Unable to replace fragment");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment