N
N
nikamon2017-08-12 15:29:51
Java
nikamon, 2017-08-12 15:29:51

How to change the color of a word in a Java string?

How can I change the color of a word in a string in Java (Android Studio)?
The string will be displayed in the ListView, so I need to get a multi-colored string in String format as a result.
Tried Spannable, however everything is lost when trying spannable.toString() (String back one color)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AStek, 2017-08-12
@AStek

Author. String is a string type that only stores text. It does not contain any information about the color of the text or individual characters. Thus in the type described by you it will not earn in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question