Android: Under what circumstances would a Dialog appearing cause onPause() to be called?
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