Last Updated: January 28, 2019
·
275
· diegocaridei

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();
  }

1 Response
Add your response

Maybe do you have some screenshots of the result? Regards!

over 1 year ago ·