Java tutorial
//package com.java2s; import android.app.Activity; import android.app.AlertDialog; public class Main { /** * * @param title * @param message */ public static void showDialog(String title, String message, Activity activity) { AlertDialog.Builder builder = new AlertDialog.Builder(activity); builder.setTitle(title); builder.setMessage(message); builder.setPositiveButton("Yes", null); builder.create().show(); } }