Relative Content

Tag Archive for androidkotlinnavigation

Navigation Drawer using Nav Host fragment

I am new to Android Studio and trying to create a Kotlin MVVM-based app. I want to implement a Navigation Drawer using a NavHostFragment within the app. I have defined the navigation layout containing all my different fragments to navigate. I would like to navigate to a fragment when an icon is clicked. This is the code that should allow this, but for some reason, the code doesn’t work.