I'm +- new to android and was wondering if it's possible to change only part of the text color in a EditText widget... Actually i'm making a notepad app where you would be able, for example, to write "bblablabal" and then click on the "yellow" button and keep writing in yellow color (the text written before doesn't have to change, as it does with the .setTextColor() method).
I've tried some of the java methods and also tried some workarounds with no succes... any ideas of how to makes this works ?
Thank you! Rodrigo.
Yes, that's possible. Take a look at SpannbleStringBuilder
.
More details: Android: Coloring part of a string using TextView.setText()?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With