Dynamic ActionBar title from a Fragment using AndroidX Navigation

前端 未结 12 1675
别那么骄傲
别那么骄傲 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:02

    As of now, The Jetpack Navigation Architecture components do not provide any "built in" way to do this, and you'll have to implement your own "custom" method for doing it.

    There is an existing feature request to get functionality for dynamic labels on destinations added to the new Jetpack Navigation Architecture Components. If you are here because you want/need this functionality, please star the existing feature request, here: https://issuetracker.google.com/issues/80267266

提交回复
热议问题