show Yes No Prompt
import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.app.ActivityManager.MemoryInfo;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
import android.text.Html;
class Utils {
public static void showYesNoPrompt(Context _context, String title, String message, OnClickListener onYesListener, OnClickListener onNoListener) {
AlertDialog.Builder builder = new AlertDialog.Builder(_context);
builder.setTitle(title);
builder.setIcon(android.R.drawable.ic_dialog_info); // lame icon
builder.setMessage(message);
builder.setCancelable(false);
builder.setPositiveButton("Yes", onYesListener);
builder.setNegativeButton("No", onNoListener);
builder.show();
}
}
Related examples in the same category