Is there an working example from Google for implem...
# compose
g
Is there an working example from Google for implementing the BottomNavigationBar which includes navigation between multiple screens including onbackpress listener? For now i’ve only found these examples: https://cs.android.com/androidx/platform/frameworks/support/+/androidx-master-dev:na[…]in/java/androidx/navigation/compose/demos/BottomBarNavDemo.kt
j
Do you mean top level navigation for bottom nav bar options + navigation then from those screens? If so, I'm just at point at trying to figure this out as well for https://github.com/joreilly/MortyComposeKMM
I have navigation for top level bottom bar options....but then want to navigate from say row in list
I just went through various samples at https://github.com/android/compose-samples but couldn't see anything that did exactly this
Feels like some kind of nested navigation is needed....
hmm, though probably need
NavHost
at different level in hierarchy....don't want for example to show bottom nav bar after selecting item in list to show details screen...
for now I've taken approach shown in https://github.com/joreilly/MortyComposeKMM/blob/main/androidApp/src/main/java/dev/johnoreilly/mortycomposekmm/ui/MainActivity.kt ....but very open to suggestions for better way of doing this
i
A bottom nav should always be visible, so just call navigate()? Back is already hooked up correctly when using NavHost