aspose file tools*
The moose likes Android and the fly likes  two different styles in one string ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark " two different styles in one string ?" Watch " two different styles in one string ?" New topic
Author

two different styles in one string ?

chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 192
Hi,

How can I define the text in a TextView that contain one string with two different styles ?
For example : “Hello World

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
It's a bit tricky, but possible. Check out the Spannable interface and its implementations. I think you'd use a SpannableStringBuilder to create such a string.


Ping & DNS - my free Android networking tools app
chen young
Ranch Hand

Joined: Sep 09, 2005
Posts: 192
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: two different styles in one string ?