Java tutorial
//package com.java2s; import android.text.Html; import android.text.Spanned; public class Main { public static Spanned stringToSpan(String src) { return src == null ? null : Html.fromHtml(src.replace("\n", "<br />")); } }