Java tutorial
//package com.java2s; import android.app.*; import android.content.*; public class Main { public static AlertDialog newMessageDialog(Context context, String s, String s1, int i) { android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(context); builder.setCancelable(false); builder.setPositiveButton("Okay", new android.content.DialogInterface.OnClickListener() { public void onClick(DialogInterface dialoginterface, int j) { dialoginterface.dismiss(); } }); builder.setTitle(s); builder.setMessage(s1); builder.setIcon(i); return builder.create(); } }