Java tutorial
//package com.java2s; import android.app.Activity; import android.app.AlertDialog; public class Main { /** * * @param context * @param strTitle * @param strText * @param icon */ public static void showDialog(Activity context, String strTitle, String strText, int icon) { AlertDialog.Builder tDialog = new AlertDialog.Builder(context); tDialog.setTitle(strTitle); tDialog.setMessage(strText); tDialog.setPositiveButton(android.R.string.ok, null); tDialog.show(); } }