I have a activity which start with a alertdialog
when i press back button only dialog get close.
I want to close both dialog and activity.
How to do this?
You are looking for the OnCancelListener
that can be set for the Dialog.setOnCancelListener()
There you can call finish()
which will finish your Activity
, too.