【发布时间】:2021-03-02 16:35:34
【问题描述】:
我正在使用带有导航 UI 的工具栏,当从顶级目的地导航到任何其他目的地时,导航按钮显示为向上按钮,并且标题向右移动。 当点击返回时,工具栏导航图标被隐藏,标题回到工具栏的开头并带有幻灯片动画。
var appBarConfiguration = AppBarConfiguration.Builder(
setOf(
R.id.homeFragment,
R.id.moreOptionsFragment,
R.id.accountDetailsFragment
)
).build()
navController = findNavController(R.id.navHostMain)
binding.bottomNavView.setupWithNavController(navController)
NavigationUI.setupWithNavController(toolbar, navController, appBarConfiguration)[enter image description here][1]
如何在返回顶级片段时禁用标题上的动画?
【问题讨论】:
标签: android android-toolbar android-architecture-navigation