I was trying out Navigation architecture component and is now having difficulties in setting the title. How do I set the title programmatically and also how it works?
Another approach could be this:
fun Fragment.setToolbarTitle(title: String) { (activity as NavigationDrawerActivity).supportActionBar?.title = title }