A
A
Alexander Sinitsyn2018-07-27 16:31:09
Android
Alexander Sinitsyn, 2018-07-27 16:31:09

How to make autosave in a fragment on the back button?

There are two fragments in one list, the second is a form. When closing the form by Back, you need to save and so that the data in the list is updated.
Tried Observer. I connect it in Attach, I disconnect it in Detach. But something does not grow together and nothing is updated.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2018-07-27
@a_u_sinitsin

Is it correct?
If you think that is correct from the user's point of view, then look at
onStop
onPause
onBackPressed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question