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
如果说lifecycle.bindToLifecycle()是自动管理生命周期,那么使用lifecycle.bindUntilEvent(event)时 BasePresenter<V, T> implements LifeCycleListener不用具体实现什么吗
The text was updated successfully, but these errors were encountered:
@tmyzh13 lifecycle.bindUntilEvent(event) 这个event是可以是ActivityEvent.STOP,ActivityEvent.DESTORY,,,等 这时候RX的所做的操作就是在event指定的生命周期取消网络请求 DESTORY=》onDestroy()
LifeCycleListener这个回调接口,可能是命名让人误解了,其实我的初衷是,为了在activity/fragment的生命周期中对 presenter 引用着的view和activity做释放 ,可以查看BasePresenter<V, T> 中对LifeCycleListener的实现。。。
Sorry, something went wrong.
谢谢你的答复,我可以这么理解吗 lifecycle.bindToLifecycle()自动管理按其实一般是activity的ondestroy这个阶段结束了rx的请求(这个应该与Dispose 这个关闭通道不重复吧,结束生命周期之后是不发送了,关闭通道是不接受但是还在发送) 然后用lifecycle.bindUntilEvent(event) 这个event就是在指定的周期去结束。lifeCycleListener你说为了在activity/fragment的生命周期中对 presenter 引用着的view和activity做释放,其实对于lifecycle.bindToLifecycle()就是在activity的onDestroy里面去让presenter做一些解绑操作,我自己最近在学习mvp并且尝试搭建 也看过你写的借鉴了异常的封装 你可以帮我看看有没有什么问题吗https://github.com/tmyzh13/MvpDemo/tree/master/app/src/main/java/com/example/issuser/mvpdemo/dagger_mvp_test/testthrea 这部分是最新运用了mvp的逻辑页面
No branches or pull requests
如果说lifecycle.bindToLifecycle()是自动管理生命周期,那么使用lifecycle.bindUntilEvent(event)时 BasePresenter<V, T> implements LifeCycleListener不用具体实现什么吗
The text was updated successfully, but these errors were encountered: