Code example for FragmentTransaction

Methods: addToBackStack, remove

0
            DialogFragmentHelper fragment, Bundle arguments, String tag) {
        FragmentManager manager = activity.getSupportFragmentManager();
        FragmentTransaction transaction = manager.beginTransaction();
        Fragment current = manager.findFragmentByTag(tag);
        if (current != null)
            transaction.remove(current);
        transaction.addToBackStack(null);
 
        fragment.setArguments(arguments);
        fragment.show(manager, tag);
    } 
 
    /** 
     * Create bundle with standard arguments 
     * 
     * @param title 
     * @param message 
     * @param requestCode 
     * @return bundle 
     */ 
    protected static Bundle createArguments(final String title,