Android onAppHasFocus onAppLosesFocus
预先感谢您对这个问题的帮助,
我想知道我的应用程序何时获得和失去焦点。
我知道如何判断特定活动窗口何时获得或失去焦点,但如果主活动窗口有打开的子窗口,则主窗口失去焦点
我想知道我的应用程序何时完全失去焦点(包括其子活动)并获得焦点完全失焦后对焦,
谢谢
Thanks in advance for your help with this question
I want to know when my app gains and loses focus.
I know how to tell when a specific activity window gains or loses focus, but if the main activity window has sub windows that open, the main window loses focus
I want to know when my app loses focus entirely, including it's sub activities, and gains focus after it was entirely out of focus
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查
onPause
和
onResume
checkIfAllDead() 检查所有布尔值是否为 false...
Check
onPause
and
onResume
checkIfAllDead() checks if all the booleans are false...