I have a toolbar as well as a navigation drawer. When I start my app, the toolbar and navigation drawer are created. When I click items in the navigation drawer, it starts n
The simplest option is to do
toolbar.inflateMenu(R.menu.fragment_menu);
and for handle click on menu item
toolbar.setOnMenuItemClickListener { when (it.itemId) { R.id.nav_example -> doThat() } true }