java Programming Glossary: spannablestring
How to use SpannableString with Regex in android? http://stackoverflow.com/questions/7364119/how-to-use-spannablestring-with-regex-in-android to use SpannableString with Regex in android I am trying to color part of a string.. static String StringReplace String source String find ABC SpannableString replace new SpannableString find replace.setSpan new ForegroundColorSpan.. String source String find ABC SpannableString replace new SpannableString find replace.setSpan new ForegroundColorSpan Color.RED 0 1..
Is it possible to change the text color in a string to multiple colors in Java? http://stackoverflow.com/questions/8405661/is-it-possible-to-change-the-text-color-in-a-string-to-multiple-colors-in-java this question Yes its possible. For this you need to use SpannableString and ForegroundColorSpan . This should look something like this.. ForegroundColorSpan . This should look something like this SpannableStringBuilder builder new SpannableStringBuilder String red this is.. something like this SpannableStringBuilder builder new SpannableStringBuilder String red this is red SpannableString redSpannable new..
|