Fragment already added IllegalStateException

前端 未结 11 1497
一向
一向 2020-11-28 07:42

I use this method on my container Activity to show a BFrag

public void showBFrag()
{
    // Start a new FragmentTransaction
    FragmentTransaction fragmentT         


        
11条回答
  •  不知归路
    2020-11-28 08:01

    try this after fragmentTransection.replace()

    fragmentTransection.addToBackStack(null);
    fragmentTransection.commitAllowingStateLoss();
    

提交回复
热议问题