0

In my app I'm using navController to switch between fragments. I have a problem with this scenario:

  • ItineraryFragment is opened (at the top of the screen it is a horizontal recyclerview with some days and below the recyclerView it is another fragment); the fragment contained is filled with the attractions corresponding to the first day of the list
  • When another day from the recyclerView is clicked, the fragment changes its content with the attractions corresponding to that day

UI example

Is it possible to create this behavior using only navigation components? Now the nested fragment is put into a FrameLayout using fragmentTransaction but I'd like to use only navController.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216
elena
  • 21
  • 4
  • Currently Navigation component does not support multiple back stacks out of the box. But you can create a extension function as mentioned here: https://stackoverflow.com/a/64142496/9715339 – Mayur Gajra Apr 10 '21 at 12:32
  • See [nested navigation graphs](https://developer.android.com/guide/navigation/navigation-nested-graphs) ... – Martin Zeitler Apr 10 '21 at 12:33

0 Answers0