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
有一个使用场景需要在scene内部监听栈进出。push时可以,pop时收不到。
requireNavigationScene().addNavigationListener(this , NavigationListener { from, to, isPush -> //pop 时没有回调 } )
The text was updated successfully, but these errors were encountered:
你这个被pop的就是你在监听的Scene?
Sorry, something went wrong.
@qii 对。
addNavigationListener 的时候这个 this 就是当前的 Scene 的 lifecycleowner,pop 这个 Scene 的时候,自然因为 lifecycle 销毁,于是回调被移除了,于是也就收不到 NavigationListener 的回调。或者你可以考虑把 this 改为 requireNavigationScene(),然后在回调里面判断 from == 你的 Scene,并且 isPush == false,然后再把自己 removeNavigationListener 掉
交给navigation scene也是可以的
No branches or pull requests
有一个使用场景需要在scene内部监听栈进出。push时可以,pop时收不到。
The text was updated successfully, but these errors were encountered: