Code example for ListFragment

Methods: getFragmentManager

0
        openDrugDetails(id);
    } 
 
    void openDrugDetails(long id)
    { 
        FragmentTransaction ft = getFragmentManager().beginTransaction();
        Fragment prev = getFragmentManager().findFragmentByTag("dialog");
        if (prev != null) {
            ft.remove(prev);
        } 
        ft.addToBackStack(null);
 
        // Create and show the dialog. 
        DialogFragment newFragment = DrugDetailsFragment.newInstance(id);
        newFragment.show(ft, "dialog");
    } 
} 
Connect your IDE to all the code out there  Get Codota for Java