Here you can find the source of alert(String title, String message, Context context)
public static void alert(String title, String message, Context context)
//package com.java2s; import android.app.AlertDialog; import android.content.Context; import android.text.SpannableString; import android.text.method.LinkMovementMethod; import android.text.util.Linkify; import android.widget.TextView; public class Main { public static void alert(String title, String message, Context context) { alert(title, message, context, false); }//from ww w.j ava2 s .c om public static void alert(String title, String message, Context context, boolean linksClickable) { SpannableString spannableString = new SpannableString(message); if (linksClickable) { Linkify.addLinks(spannableString, Linkify.ALL); } AlertDialog dialog = new AlertDialog.Builder(context) .setTitle(title).setMessage(spannableString) .setPositiveButton(android.R.string.ok, null).create(); dialog.show(); // Make text links clickable if (linksClickable) { ((TextView) dialog.findViewById(android.R.id.message)) .setMovementMethod(LinkMovementMethod.getInstance()); } } }