Dynamic ActionBar title from a Fragment using AndroidX Navigation

前端 未结 12 1724
别那么骄傲
别那么骄傲 2020-12-04 16:16

I am using the new Navigation component from Android Jetpack.

The root Activity setup is quite simple:

override fun onCreate(savedInstanceState: Bund         


        
12条回答
  •  北荒
    北荒 (楼主)
    2020-12-04 17:19

    you can remove android:label in navigation graph then write in onCreateView()

    activity?.title="your title"
    

提交回复
热议问题