I am working on adding a toolbar title in the NavGraph. I used android:label"sample tile" in the NavGraph, but its not updating the toolbar with the label.
Tried using android:label in the NavGraph, but its not updating the title of the toolbar.
I am working on adding a toolbar title in the NavGraph. I used android:label"sample tile" in the NavGraph, but its not updating the toolbar with the label.
Tried using android:label in the NavGraph, but its not updating the title of the toolbar.
Copyright © 2021 Jogjafile Inc.
Using
android:labelalone won't be fully integrated with jetpack navigation.In documentation:
So, you need to configure the top app bar to work with
NavigationUIand this is done throughsetupWithNavController().This section in documentations provides an example: