Skip to content

Instantly share code, notes, and snippets.

@dingbuoyi
Created April 4, 2016 08:30
Show Gist options
  • Save dingbuoyi/a42409bf3eb305af9987355b821a6211 to your computer and use it in GitHub Desktop.
Save dingbuoyi/a42409bf3eb305af9987355b821a6211 to your computer and use it in GitHub Desktop.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.test_activity_custom_ui_3);
addFragment(android.R.id.content,
DiamondsWalletFragment.newInstance(),
"DiamondsWalletFragment");
}
protected void addFragment(int containerViewId,
Fragment fragment,
String fragmentTag) {
getSupportFragmentManager()
.beginTransaction()
.add(containerViewId, fragment, fragmentTag)
.disallowAddToBackStack()
.commit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment