H
H
habaril2019-06-28 17:55:59
Java
habaril, 2019-06-28 17:55:59

How to avoid screen re-creation, use Navigation Components in Android?

Hello.
I had a BottomNavigationView with 5 fragments, I switched them using show() and hide(), so I could save the state of the fragment when switching. Connected Navigation Components, fragments are recreated each time when switching. Is there any way to avoid this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question