我是 android 初学者开发者,我希望我的通知片段指向正确的名称选项卡位置 我在 rest val tab_approval_type:String 中的参数 我的参数选项卡批准包含 3 个参数:加班、休假、许可 我的标签包含 3 种类型,包含在一个片段中,我的姓名标签:加班、休假、许可 我想要这个结果示例,我从通知片段单击许可,然后参数显示选项卡许可。
my code like this in fragment notification
private fun navigate(type: String) {
if (findNavController().currentDestination?.id == R.id.notificationFragment) {
when (type) {
"Approval" -> findNavController().navigate(NotificationFragmentDirections.navigateToApproval())
}
}
}
how to fix this? thank you