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
override fun attachView(mView: V) { mCompositeDisposable = CompositeDisposable() this.mView = mView if (mView is LifecycleOwner) { (mView as LifecycleOwner).lifecycle.addObserver(this) } if (useEventBus()) { EventBus.getDefault().register(this) } }
刚接触lifecycle我很好奇的是,这个地方的mView为什么会是一个LifecycleOwer呢?还请指点一下。
The text was updated successfully, but these errors were encountered:
@wangxp423 AppCompatActivity 最终会继承 SupportActivity ,SupportActivity 实现了 LifecycleOwner 接口。
AppCompatActivity
SupportActivity
LifecycleOwner
Sorry, something went wrong.
No branches or pull requests
override fun attachView(mView: V) { mCompositeDisposable = CompositeDisposable() this.mView = mView if (mView is LifecycleOwner) { (mView as LifecycleOwner).lifecycle.addObserver(this) } if (useEventBus()) { EventBus.getDefault().register(this) } }
刚接触lifecycle我很好奇的是,这个地方的mView为什么会是一个LifecycleOwer呢?还请指点一下。
The text was updated successfully, but these errors were encountered: