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