http://d.android.com/reference/android/text/Html.html

This lets you put sanitized html content into a textview.  It's great
for clickable links or styled text with inline images if you aren't
too picky about where the image ends up.   It's going to basically
treat each image as a character in the textfield, in terms of how it
looks.

The sanitized html is returned as a Spanned:

http://d.android.com/reference/android/text/Spanned.html

which is a really useful class, and this is a good way to start using
it.  Often if I want to display simple stylized text the easiest way I
can find is to create some simple html, and use the above method.

It's weak on properly wrapping text around the images, you can have
one line of text to the left and or right of an image, but you can't
wrap multiple lines around, so a lot of white space will be created
with tall images.

-My 2 cents

On Dec 4, 1:02 am, Samuh <samuh.va...@gmail.com> wrote:
> > The best way I can think of getting around this problem
> > would be showing your HTML content inside a WebView. :)
>
> Thanks for your reply Bibek. That is exactly what I am currently
> doing.
>
> However, I think a WebView would definitely be heavier than a
> TextView. Assuming, I receive say 20 items in the feed wouldn't
> creating 20 WebView instances affect the memory footprint of the
> module?

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to