Skip to content

Instantly share code, notes, and snippets.

@app2641
Created August 30, 2012 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save app2641/3522530 to your computer and use it in GitHub Desktop.
Save app2641/3522530 to your computer and use it in GitHub Desktop.
activity fargment class
@Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sample);
FragmentManager manager = getFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.add(R.id.activity_container, new FragmentSample1());
transaction.commit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment