Skip to content
New issue

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

doOnLifecycle 不执行回调 #11

Closed
aheven opened this issue Jun 28, 2022 · 2 comments
Closed

doOnLifecycle 不执行回调 #11

aheven opened this issue Jun 28, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@aheven
Copy link

aheven commented Jun 28, 2022

//AppCompatActivity
//调用
lifecycleOwner.lifecycle.addObserver(object :DefaultLifecycleObserver{
    override fun onResume(owner: LifecycleOwner) {
        logError("11111:onResume")
    }
})

//不调用
doOnLifecycle(onResume = {
    logError("11111:onResume")
}, onPause = {
    logError("11111:onPause")
})

求解???

@DylanCaiCoding
Copy link
Owner

感谢反馈,之前把 Java7 的 LifecycleObserver 改成 Java8 的 DefaultLifecycleObserver 后没处理好,今晚会发个新版

@DylanCaiCoding DylanCaiCoding added the bug Something isn't working label Jun 28, 2022
@DylanCaiCoding
Copy link
Owner

已发 1.1.0 版本解决了该问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants