1// activity_main.xml
2<fragment
3 android:layout_width="match_parent"
4 android:layout_height="match_parent"
5 android:name="androidx.navigation.fragment.NavHostFragment"
6 android:id="@+id/nav_host_fragment"
7 app:navGraph="@navigation/mobile_navigation" />
8
9// MainActivity.kt
10val toolbar = findViewById<MaterialToolbar>(R.id.main_toolbar)
11setSupportActionBar(toolbar)