Currently I am working on a application, which contains one switch. When we touch switch , it initiates a Dialog.
I want to know:
- Since My Dialog box is above Activity, when we exit from dialog why
onResumeus not called. - Which functions get called when Dialog ends
You will need to implement the
onCancelled()andonDismiss()listeners for theDialog. These will be called when the user either cancels, or dismisses the dialog.The reason
onResume()is never called, is because the activity is never paused. Its just an overlay, and your activity carries on in the background.