Here you can find the source of createAlertDialog(Context cx, String title, String message)
public static AlertDialog.Builder createAlertDialog(Context cx, String title, String message)
//package com.java2s; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; public class Main { public static AlertDialog.Builder createAlertDialog(Context cx, String title, String message) { return new AlertDialog.Builder(cx) .setTitle(title)/*ww w . j a va 2s . com*/ .setMessage(message) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // continue with delete } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { // do nothing } }); } }