Top "Spannable" questions

An Android Spannable is an interface for text to which markup objects can be applied.

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 convert SpannedString to Spannable

Hello I have set some text in a textview. TextView tweet = (TextView) vi.findViewById(R.id.text); tweet.setText(Html.…

android textview spannable
Adding a padding/margin to a Spannable

I'm using BackgroundColorSpan to customize parts of a TextView. Here's the code I have: String s = "9.5 Excellent!"; s.setSpan(new …

android spannable
select a word on a tap in TextView/EditText

How to select a word on a tap in TextView/EditText in android. I have some text in a TextView/…

android textview android-edittext spannable
TextView selection with Spannable and LinkMovementMethod

What i did so far is a list view of textviews having the normal text and clickable spans: Clicking the …

android android-listview textview linkify spannable
Combining Spannable with String.format()

Suppose you have the following string: String s = "The cold hand reaches for the %1$s %2$s Ellesse's"; String old = "old"; …

android spannablestring spannable
how set margin between spannable textview?

I am trying to create spannable textview and showing it in EditText. So user can type something in EditText and …

android textview margins spannable
ImageSpan on EditText (smileys). With SwiftKey Keyboard doesnt work

I am doing a simple chat application and i want to show smileys on edittext while writing the message. I …

android android-edittext spannable
Unable to add ForegroundColorSpan

SpannableStringBuilder sb = new SpannableStringBuilder("Hello World"); ForegroundColorSpan fcs = new ForegroundColorSpan(R.color.text_blue); sb.setSpan(fcs, 5, 11,Spannable.SPAN_EXCLUSIVE_…

android spannable
How to clear formatting of a Spannable Text, including last character?

I am using this code to remove formatting of a spannable text from start till end. The problem is that …

android spannable