This is the code to trigger dialog box before you exit the application in android.
private void ShowMessageExit(String Message){
new AlertDialog.Builder(this)
.setMessage(Message)
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(0);
}
})
.setNegativeButton(android.R.string.no,...
Wednesday, 4 November 2015
|
Mohd Zulkamal Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or Google+ . |
Powered by Blogger.