Here you can find the source of alert(String title, String message, Context context, boolean linksClickable)
public static void alert(String title, String message, Context context, boolean linksClickable)
//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); }/* w w w . j av a 2 s.com*/ 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()); } } }