We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我在代码里面初始化navGraph
val navHostFragment = supportFragmentManager.findFragmentById(R.id.nav_host_fragment_identity) as NavHostFragment val navController = NavHostFragment.findNavController(navHostFragment) navController.setGraph( if(authStatus == "1") R.navigation.nav_identity else R.navigation.nav_identity_verify )
设置了之后,在某个二级页面返回,白屏了
Navigation.findNavController(requireActivity(),R.id.nav_host_fragment_identity).navigateUp()
第一次设置navGrpah的日志
2022-01-21 16:12:17.797 D/Nav: --isSingleTopReplacement --- false 2022-01-21 16:12:17.797 D/Nav: --mBackStack.size:0 getFragments().size():0 2022-01-21 16:12:17.797 D/Nav: --Replace --- InitiateVerifyFragment{6b983ed} (35176420-6950-4140-97fe-c1951b65d7a9)
跳转二级页面的日志
2022-01-21 16:12:21.625 D/Nav: --isSingleTopReplacement --- false 2022-01-21 16:12:21.625 D/Nav: --mBackStack.size:1 getFragments().size():1 2022-01-21 16:12:21.625 D/Nav: --Add --- UploadVerifyFragment{9c80c27} (b504e152-121d-4bc7-84cf-efa6358bf1ca) 2022-01-21 16:12:21.626 D/Nav: --Hide --- InitiateVerifyFragment{ddb6b77} (55ca39c0-09e1-4355-b0dc-c311cb6af423 id=0
返回的时候没有日志,只隐藏了二级页面,一级页面也没显示,导致白屏了。
The text was updated successfully, but these errors were encountered:
去掉了xml里面的动画(自带的动画)之后,行为似乎正常了。
Sorry, something went wrong.
No branches or pull requests
我在代码里面初始化navGraph
设置了之后,在某个二级页面返回,白屏了
第一次设置navGrpah的日志
跳转二级页面的日志
返回的时候没有日志,只隐藏了二级页面,一级页面也没显示,导致白屏了。
The text was updated successfully, but these errors were encountered: