简体   繁体   English

Android为什么在onStop调用后可见活动

[英]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.

相关问题 Android-Activity onStop之后是否调用onServiceDisconnected? - Android - Does onServiceDisconnected be called after Activity onStop? 在调用onStop()之后导航到活动 - Navigating to activity after onStop() is called 为什么在onActivityResult()中启动Activity时在onCreate()之后调用onStop() - Why onStop() is called after onCreate() when starting an Activity within onActivityResult() 为什么在我的Activity启动后立即调用onStop? - Why is onStop being called right after my Activity is launched? Android活动生命周期-在onStop()之后和调用onDestory()时会发生什么 - Android activity lifecycle - what happens after onStop() and when onDestory() is called 在onStop()之后调用的Android onPause() - Android onPause() called after onStop() 启动活动后立即调用OnPause和OnStop() - OnPause and OnStop() called immediately after starting activity 为什么即使我的活动完全不可见,我的活动的onStop()也不被调用,仅onPause()被调用? - Why my activity's onStop() is not getting called only onPause() is getting called even when my activity is completely not visible? 在onStop()之后,线程的Android活动被破坏 - Android activity with threads get destroyed after onStop() 在onCreate之后调用Android onStop onDestroy - Android onStop onDestroy called after onCreate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM