Questions tagged [android-spannable]
33 questions
0
votes
1 answer
Is there any way to change the color of an already applied BackgroundColorSpan in a SpannableString?
What I'm actually doing is I'm storing a SpannableString in the form of HTML but it has a BackgroundColorSpan which has an aplha channel in its color. Now I got to know (via trials) that my aplha channel of the color goes away (due to inability of…

Anant Singh
- 1
- 1
0
votes
1 answer
Android - Spannable: Unable to set multiple spans at once
I have the following code to set a color span on multiple subStrings of the same string.
fun getColoredText(text: String, @ColorInt color: Int, vararg coloredSubText: String): Spannable {
val spannable = SpannableString(text)
for…

Sunny
- 7,444
- 22
- 63
- 104
0
votes
2 answers
TextView with spans , how can I know which one is clicked on?
I am using this library, but from the onClick styles that they have, neither handles my needed case.
https://github.com/splitwise/TokenAutoComplete
So I wanted to do my own. So I have a ContactsCompletionView, which is a TextView. and I override the…

rosu alin
- 5,674
- 11
- 69
- 150