views:

45

answers:

1

1) How would one go about altering/extending TextView to render inline images?

It seems that setText(Html.fromHtml(...image tags...)) might actually allow image insertion if set up correctly, but I haven't tried myself. Even if, I would still need fine grained control over the image drawing (my final goal is to display inline animated smiley images). So unfortunately a view based on WebKit or similar is not an option either.

2) As an alternative solution I thought of mixing TextViews and ImageViews (or more specifically, custom subclasses thereof which allow animation), but I'm not sure how I could achieve proper wrapping there (I'm fairly new to Android).

A: 

Does this text need to be editable, or just displayed? Another option might to be to render your content in a WebView and layout your text/images using straight html.

raidfive
(You probably answered before I edited my question) Ideally it should be editable, but even if it's not editable WebView is too limited. There's no support for animated gifs in WebView. It's not too hard to animate gifs by drawing on a canvas (+ graphics.Movie). I just need to find a way to get this functionality within a TextView or (if I do without the ability to edit) to combine TextViews with (the extended) ImageViews in a wrapping fashion.