mercredi 27 mai 2015

List fragment not disappearing

Based on my code whenever I run my app and click a list item, the intended fragment does appear but the list fragment does not disappear from view (see attached screenshot). What needs to be done in order to remove the list from the user's view?

    FragmentItem1 newFragment = new FragmentItem1();
    FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();

    transaction.replace(R.id.master_container, newFragment);                         

transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
    transaction.addToBackStack(null);
    transaction.commit();

enter image description here

Aucun commentaire:

Enregistrer un commentaire