FragmentManager putFragment - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for FragmentManager putFragment method.

This code example shows how to use the following methods:putFragment
    public void onSaveInstanceState(Bundle outState) {
        final FragmentManager fm = getSupportFragmentManager();
        fm.putFragment(outState, FIRST_WOO_HOO, mFirstWooHooFragment);
        fm.putFragment(outState, PARENT, mParentFragment);
        fm.putFragment(outState, SECOND_WOO_HOO, mSecondWooHooFragment);
        outState.putInt(POSITION, mPager.getCurrentItem());
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        mCurrentFragment.onActivityResult(requestCode, resultCode, data);
    private void initializeFragments(Bundle savedInstanceState) {
putFragment Method Overview
Put a reference to a fragment in a Bundle.
See Code Examples for other Android FragmentManager Methods: