causing a java.IllegalStateException error, No Activity, only when navigating to Fragment for the SECOND time

前端 未结 8 1303
感动是毒
感动是毒 2020-12-08 06:39

I am getting a very puzzling bug that I have no idea how to even begin working through.

I have a simple app with one activity, the views are implemented with Fragme

8条回答
  •  一整个雨季
    2020-12-08 07:30

    Please check number 32 of this link :

    Child FragmentManager retained after detaching parent Fragment

    Steps:

    1. Download and copy this class to your project
    2. extend every Fragment with the support v4 one(best practice)
    3. use that class instead of FragmentStatePagerAdapter

提交回复
热议问题