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
firstFragment -》secondFragment 时,firstFragment 的 onPause/onStop 不会回调,返回到 firstFragment 时,却会调用 onStart、onResume。
The text was updated successfully, but these errors were encountered:
我也发现这个问题,请问解决了吗?A B C 三个页面 其中 B 页面做的生命周期只有在创建和销毁的时候才会触发生命周期,如果 B -> C 的场景下,不会触发 B 的 onStop 和 onPause。
Sorry, something went wrong.
看了下源码,自己修改下就可以了。 作者的自定义 FragivityFragmentNavigator 类中,第165行,navigate 方法中添加如下代码: if (isAdded && prevFragment != null) { ft.hide(prevFragment) //我添加了一个生命周期回调,页面跳转的时候可以触发 onResume onPause ft.setMaxLifecycle(prevFragment, Lifecycle.State.STARTED) }
即可实现页面跳转的生命周期触发
No branches or pull requests
firstFragment -》secondFragment 时,firstFragment 的 onPause/onStop 不会回调,返回到 firstFragment 时,却会调用 onStart、onResume。
The text was updated successfully, but these errors were encountered: