Answer the question
In order to leave comments, you need to log in
Why doesn't the fragment call onSaveInstanceState?
There is MainActivity inherited from AppCompatActivity. It has bottom navigation. The new Nav is used to switch between fragments. Graph Component.
The problem is this: the fragment doesn't call onSaveInstanceState. And I need to save this state when switching between fragments. There was a discussion of a similar problem here, and someone wrote that this method may not even be called once.
How do I save information from a fragment, since collecting it from the database each time takes time that I don’t want to spend? Are there any alternatives?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question