Currently it just displays the name of the application and I want it to display something custom and be different for each screen in my app.
For example: my home scr
For future developers that are using AndroidX and the navigation architectural component.
Instead of setting the toolbar title using one of the solutions above, which can be very painful if you want to set it dynamically on a back stack change, you can set a placeholder for the title of the fragment in the navigation graph like the following:
The placeholder value has to be provided using the FragmentDirections
(via the action method).
It is then replaced in the title and show like Hello World
(when placeholder = "World"
).