Two NavHosts with their own NavControllers and NavGraphs (Navigation Component) //Android Kotlin Dev Diary

I am trying to make a single-activity app because I’d like to easily share data across screen using, ideally one, or as few as possible ViewModels. NavGraph 1 Host: Layout file of MainActivity Destination(s): CreateLogFragment NavGraph 2 Host: Layout file of CreateLogFragment Destination(s): CreateLogFoodFragment, CreateLogNotesFragment (CreateLogFragment has a BottomNavigationBar that switches between CreateLogFoodFragment and CreateLogNotesFragment) […]

Read More