Fragment's onSaveInstanceState() is never called

后端 未结 6 1164
醉酒成梦
醉酒成梦 2020-11-30 10:31

I\'m trying to save data in a Fragment\'s onSaveInstanceState(), but the method is never called.

Can someone help?

public class MyFragment extends Fr         


        
6条回答
  •  不知归路
    2020-11-30 11:33

    In some situations you might find it helpful to use fragment arguments instead of savedInstanceState. Further explanation.

提交回复
热议问题