更新时间:2021-11-25 23:02:35
您可以使用 addOnDestinationChangedListener
:
You can use the addOnDestinationChangedListener
:
navController.addOnDestinationChangedListener { controller, destination, arguments ->
if (destination.id == R.id.nav_xxxx){
supportActionBar?.setHomeAsUpIndicator(R.drawable.xxxx)
}
}