How do I get back to the fragment without losing data using Navigation Component?

Viewed 404

I have a single activity named MainActivity which holds the FirstFragment. Using Navigation Components and I already set that the single fragment that can be opened from FirstFragment is SecondFragment. I have also enabled the back button to be able to navigate back from SecondFragment to the FirstFragment. But, when I come back the fields are filled differently than I left.

0 Answers
Related