[英]Android why is activity visible after onStop called
I have placed prints in all my activity call backs and what I am seeing is a sequence onStart()->onResume()->onStop() but after onStop is called I see the same activity the main activity displaying. 我在所有活动回调中都放置了打印件,所看到的是序列onStart()-> onResume()-> onStop(),但是在调用onStop之后,我看到的是显示主要活动的相同活动。 Docs indicate this is called when activity is no longer visible but it looks to me like its getting called when my service is put in the foreground. 文档表明,当活动不再可见时,将调用此方法,但对我来说,就像将服务放在前台时被调用一样。 So which one is guaranteed to be called when it becomes not visible? 那么当它不可见时,可以保证调用哪个? onStop() was called but my activity is still visible and user can interact with it. 调用了onStop(),但我的活动仍然可见,用户可以与其进行交互。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.