onpause

Android: Under what circumstances would a Dialog appearing cause onPause() to be called?

故事扮演 提交于 2019-11-26 15:04:24
A snippet from the Android Activities document(scroll down to the " foreground lifetime " line) says : An activity can frequently transition in and out of the foreground—for example, onPause() is called when the device goes to sleep or when a dialog appears . I don't quite understand this. Under what circumstances should this happen? Is onPause() called only if the context of the dialog in question is different from the activity on top of which the dialog is to be displayed? EDIT: Adding code sample to illustrate my doubt in detail Going by the above-mentioned quote from document, should my

onDestroy gets called each time the screen goes on

本小妞迷上赌 提交于 2019-11-26 14:06:45
问题 My application gets killed each time that it comes back from the screen-off-state. I fetch all the information that my app does, but I can't find out why it calls onDestroy. It's the first time I'm seeing this behavior in my applications. My main activity extends tabActivity because it contains a tabhost. I've read that it has to extend it or it will FC. I'm not sure if my issue is related to this?! Oh and it implements Observer but this should be no problem. Here are the logs: 07-21 09:57:53

Android: Under what circumstances would a Dialog appearing cause onPause() to be called?

痴心易碎 提交于 2019-11-26 04:08:47
问题 A snippet from the Android Activities document(scroll down to the \" foreground lifetime \" line) says : An activity can frequently transition in and out of the foreground—for example, onPause() is called when the device goes to sleep or when a dialog appears . I don\'t quite understand this. Under what circumstances should this happen? Is onPause() called only if the context of the dialog in question is different from the activity on top of which the dialog is to be displayed? EDIT: Adding