如何从通知片段中打开正确的指定名称选项卡?

时间:2021-05-10 04:05:30

标签: android android-studio kotlin

我是 android 初学者开发者,我希望我的通知片段指向正确的名称选项卡位置 我在 rest val tab_approval_type:String 中的参数 我的参数选项卡批准包含 3 个参数:加班、休假、许可 我的标签包含 3 种类型,包含在一个片段中,我的姓名标签:加班、休假、许可 我想要这个结果示例,我从通知片段单击许可,然后参数显示选项卡许可。 now my notification after click not show right tab

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

0 个答案:

没有答案