How to set title in app bar with Navigation Architecture Component

前端 未结 12 1993
面向向阳花
面向向阳花 2020-12-24 11:40

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?

<
12条回答
  •  庸人自扰
    2020-12-24 12:43

    The API may have changed since the question was asked, but now you may indicate a reference to a string in your app resources in the navigation graph label.

    This is pretty helpful if you want a static title for your fragments.

提交回复
热议问题