How to change label attribute of a destination in navigation controller?
问题 I am trying to use navigation controller in Android as you can see in the image above, I set the label attribute of my destination to be 'Home'. and this label, will show like title in my toolbar. can I change that label programatically ? because I want to set my toolbar title dynamically. I have tried to change the toolbar title using toolbar.title = "some title here" but it will always be overlapped the title from that label. so how to solve this ? 回答1: Do it in your activity like below it