Fragment already added IllegalStateException

前端 未结 11 1470
一向
一向 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:06

    Check whether the frament is already added or not using the method fragment.isAdded() Do replace or add the fragment accordingly

提交回复
热议问题