Android fragments setRetainInstance(true) not works (Android support library)

后端 未结 2 1428
伪装坚强ぢ
伪装坚强ぢ 2020-12-20 02:30

I have a problem with saving fragment state. I try to use setRetainInstance, but cant make it work((( I change a state to 2 using button1, but after changing screen orientat

2条回答
  •  暖寄归人
    2020-12-20 03:13

    There isn't anything wrong with the code you posted. If you have the fragment implemented correctly, it should be giving you a state of 2. Maybe you could post your activity and xml files. There error must be somewhere else.

提交回复
热议问题