Lines Matching refs:text
24 import android.text.Html;
25 import android.text.Html.ImageGetter;
26 import android.text.Html.TagHandler;
27 import android.text.SpannableStringBuilder;
28 import android.text.Spanned;
29 import android.text.TextUtils;
30 import android.text.style.ImageSpan;
31 import android.text.style.QuoteSpan;
34 * Provides static functions to perform custom HTML to text conversions.
41 * Converts HTML string to a {@link Spanned} text, adjusting formatting. Any extra new line
42 * characters at the end of the text will be trimmed.
44 public static Spanned fromHtml(Context context, String text) {
45 if (TextUtils.isEmpty(text)) {
48 Spanned spanned = Html.fromHtml(text);
53 * Converts HTML string to a {@link Spanned} text, adjusting formatting and using a custom
54 * image getter. Any extra new line characters at the end of the text will be trimmed.
56 public static CharSequence fromHtml(Context context, String text, ImageGetter imageGetter,
58 if (TextUtils.isEmpty(text)) {
61 return postprocess(context, Html.fromHtml(text, imageGetter, tagHandler));
66 * of the text will be trimmed.
106 // Trim the trailing new line characters at the end of the text (which can be added
121 // Otherwise, Return a substring of the original {@link Spanned} text