Search in sources :

Example 41 with SpannedString

use of android.text.SpannedString in project MarkyMark-Android by M2Mobi.

the class TextDisplayItem method create.

@Override
public Spanned create(final InlineConverter<Spanned> pInlineConverter, final TextString pMarkDownString) {
    final Spannable spannable = SpannableUtils.createSpannable(pInlineConverter, pMarkDownString);
    final String result = StringEscapeUtils.unescapeHtml4(String.valueOf(spannable));
    return new SpannedString(result);
}
Also used : SpannedString(android.text.SpannedString) SpannedString(android.text.SpannedString) TextString(com.m2mobi.markymark.item.inline.TextString) Spannable(android.text.Spannable)

Aggregations

SpannedString (android.text.SpannedString)41 Test (org.junit.Test)15 Spanned (android.text.Spanned)12 Subtitle (com.google.android.exoplayer2.text.Subtitle)12 SpannableStringBuilder (android.text.SpannableStringBuilder)10 SpannableString (android.text.SpannableString)9 LocaleData (libcore.icu.LocaleData)6 AbsoluteSizeSpan (android.text.style.AbsoluteSizeSpan)4 TextPaint (android.text.TextPaint)2 ForegroundColorSpan (android.text.style.ForegroundColorSpan)2 ArrayList (java.util.ArrayList)2 SuppressLint (android.annotation.SuppressLint)1 NotificationChannel (android.app.NotificationChannel)1 ConversationChannel (android.app.people.ConversationChannel)1 ShortcutInfo (android.content.pm.ShortcutInfo)1 NonNull (android.support.annotation.NonNull)1 Spannable (android.text.Spannable)1 StaticLayout (android.text.StaticLayout)1 ImageSpan (android.text.style.ImageSpan)1 Pair (android.util.Pair)1