How to create a class for alertDialogBox, and it should be called for every Activity. I used a close button on every Activity while pressing the close Button, The Alert Box should kill all activities in my application.
How to create a class for alertDialogBox , and it should be called for
Share
Create a class like CustomDialog.class,
and inside of it create a static method like the one below,
And in your activity’s onBackPressed() call this method like this,