3

I want to achieve android layout for text and image to be as shown on the left pic, however with ImageSpan and in-lining image into text at start gives me only what's on the right pic.

Are there any solutions to beautifully bypass large image with text?

|-------------| texttexttexttexttext   |-------------| 
|             | texttexttexttexttext   |             | 
|   image     | texttexttexttexttext   |   image     | 
|             | texttexttexttexttext   |             |
|-------------| texttexttexttexttext   |-------------| texttexttexttexttext
texttexttexttexttexttexttexttexttext    texttexttexttexttexttexttexttexttext
texttexttexttexttexttexttexttexttext    texttexttexttexttexttexttexttexttext
texttexttexttexttexttexttexttexttext    texttexttexttexttexttexttexttexttext
|
dykzei eleeot
  • 169
  • 2
  • 6

1 Answers1

2

Possible by using an WebView and writing HTML-code. Might also be doable by inserting the HTML into an TextView with Html.fromHtml(String, Html.ImageGetter, Html.TagHandler). See an example of using ImageGetter here.

Dahlgren
  • 781
  • 4
  • 13
  • Yeah with HTML it's supposed to be as easy as text, but in TextView it doesn't change situation from Right pic to Left pic. And having WebView in ListView item when there are many of them doesn't look like solution either :( – dykzei eleeot Nov 30 '10 at 10:09