How to Change Text Style/Color of a Substring in android Studio

Published: 21 September 2021
on channel: Learning Bot
515
14

Hello Dosto.
In this tutorial, you will see how to use the SpannableString and SpannableStringBuilder classes together with ForegroundColorSpan and StyleSpan to change the text color and text style of specific parts of a string within the same TextView.

Password Toggle with textinputLayout :

Password Toggle without textinputLayout :


_______________________________________________________________
If you face any problems feel free to ask in the comment section
-------------------------------------------------------------------------------------------------------
Thank You


Watch video How to Change Text Style/Color of a Substring in android Studio online without registration, duration 12 minute 46 second in high hd quality. This video was added by user Learning Bot 21 September 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 515 once and liked it 14 people.