Top "Spannablestring" questions

Android - SpannableString is a class for text whose content is immutable but to which markup objects can be attached and detached.

SpannableStringBuilder to create String with multiple fonts/text sizes etc Example?

I need to create a String placed in a TextView that will display a string like this: First Part Not …

android spannablestring spannablestringbuilder
How to set multiple spans on a TextView's text on the same partial text?

Suppose I have the next text : Hello stackOverflow And I wish to set the second word to be both RelativeSizeSpan (…

android font-size spannablestring
SpannableString: Is it possible to apply two or more RelativeSizeSpans?

I am trying to construct a SpannableString such that it looks like this: Two characters (m, s) should be smaller …

android spannablestring spannable
Why show java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String?

When copying String from any browser page, pasteData works properly. However when copying SpannedString from a message sent item editor(…

java android string clipboard spannablestring
Android Linkify text - Spannable Text in Single Text View - As like Twitter tweet

I have a textView and text like "This is the Simple Text with KeyWord and the Link to browse" in …

android textview linkify spannablestring
Android Development: How To Replace Part of an EditText with a Spannable

I'm trying to replace part of an Editable returned from getText() with a span. I've tried getText().replace() but that's …

android replace spannablestring spannable
Is there any way to insert an ImageSpan in a TextView without disrupting the text?

It seems that in order to add an ImageSpan to a Spannable in Android, I have to actually replace some …

android spannablestring imagespan
Android SpannableString set background behind part of text

I would like to create something similar as seen on this image: I managed to create evertyhing with SpannableStringBuilder, except …

android textview spannablestring spannable
how to have bold and normal text in same textview in android?

I have searched internet and tried the following code but its not working SpannableString ss1 = new SpannableString("Health: "); ss1.setSpan(…

android spannablestring
Set different font and color to part of a TextView

I tried this: String s = "Some big string" SpannableStringBuilder sb = new SpannableStringBuilder(s); //normal font for 1st 9 chars sb.setSpan(…

android typeface spannablestring