0

I work on e-commerce app like noon and using bottom navigation with navigation component i have issue of fragment recreate each time i navigate to it like going from home to product details

and return to home again

NavigationUI.setupWithNavController(bottomNavigation, navController)

But when I'm switching fragments, they are each time destroy/create even if they were previously used.

Is there a way to keep alive our main fragments link to our BottomNavigationView?

i try use this answer but not work for me

Is there a way to keep fragment alive when using BottomNavigationView with new NavController?

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jun 21 '23 at 07:40

0 Answers0