w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
how to highlight specific string using html in android

Android doesn't truly support HTML in TextViews. It supports a limited subset of html to allow some minor styiling, and things like links. Unfortunately to get spans of text with different styles, you currently have to do it fully programatically. IE, create a SpannableString and give it style information and add it to a TextView. The process is detailed here

http://www.chrisumbel.com/article/android_textview_rich_text_spannablestring

Interestingly enough, this is alot like iOS does it.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.