Wednesday, August 29, 2012

Re: [android-developers] how to .setText of a String with different colours?

Hello,

You can also set an string with HTML Tags define color of particular char sequence.

txtview.setText(Html.fromHtml("your_html_text")); 

On Tuesday, August 28, 2012 9:36:58 PM UTC+5:30, Harri Smått wrote:

On Aug 28, 2012, at 6:52 PM, oriolmesia <mesi...@gmail.com> wrote:

> Does anyone knows how to do it?

This article is a good read for SpannableStrings;
http://www.chrisumbel.com/article/android_textview_rich_text_spannablestring

--
H

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate