onSaveInstanceState and Fragments?

前端 未结 1 489
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 11:25

How can I get a fragment to save it\'s state? I\'ve tried everything but no luck, nothing is working.

Ive tried adding:

public void onSaveInstanceSta         


        
相关标签:
1条回答
  • 2021-01-04 11:49

    Have you looked into this: Fragment's onSaveInstanceState() is never called

    You need to make sure to call super.onSaveInstanceState(Bundle) in your FragmentActivity.

    0 讨论(0)
提交回复
热议问题