在使用findNavController()導(dǎo)航Fragment,動(dòng)態(tài)設(shè)置目標(biāo)destination 的標(biāo)題
<fragment
android:id="@+id/displayFragment"
android:name="com.commonsware.jetpack.sampler.nav.DisplayFragment"
android:label="{title}" >
<argument
android:name="modelId"
app:argType="string" />
<argument
android:name="title"
app:argType="string" />
</fragment>
Bundle().apply {
putString("title","動(dòng)態(tài)標(biāo)題崆")
findNavController().navigate(R.id.displayFragment,this)
}