Code example for SpannableString

Methods: addLinks, setMessage

    public static SpannableString getLinkifiedText(Context context, int textId) {
        return getLinkifiedText(context.getText(textId));
    public static SpannableString getLinkifiedText(CharSequence text) {
        final SpannableString msg = new SpannableString(text);
        Linkify.addLinks(msg, Linkify.ALL);
        return msg;
     * confirmation dialogs 
    public static AlertDialog.Builder buildConfirmationDialog(Context context, int titleId, int msgId) {
        return new AlertDialog.Builder(context)
            .setMessage(getLinkifiedText(context, msgId));
    public static void showConfirmationDialog(Context context, int titleId, int msgId, int positiveBtnTextId) {
        try { 
Connect your IDE to all the code out there  Get Codota for Java