Java tutorial
//package com.java2s; import android.app.Activity; import android.app.AlertDialog; public class Main { public static AlertDialog createAlertDialog(Activity activity, String message, String title) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setMessage(message); builder.setNeutralButton("OK", null); return builder.create(); } }