AlertDialog
public void showAlert( String title, String message, int Icon )
{
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle( title );
alertDialog.setMessage( message );
alertDialog.setIcon( Icon );
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
}
});
alertDialog.show();
}
Written by DiegoCaridei
Related protips
1 Response
Maybe do you have some screenshots of the result? Regards!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Java
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#