I would like to know what is the best way to place multiple, small(all of them the same size) images into one TextView? From what I’ve found, the best way would be to use Html, but how? All of my images are offline ones, so I can copy them for example in the raw folder, if that is the right way. Can anyone point me into the right direction, or show a similar thread, which I did not find? OR, is there any better approach, like don’t use TextView, but something else, which can be solved in the layout files, and dynamically filled with images?
Btw, the whole thing I want to do is:
- I have a ListView, filled with items
- each item has different attributes, which I currently print in plaintext(I want to replace theese with images
- atm, I use one separate TextView to display theese attributes
- the number of attributes are random, but at least 1, and typically 3-4(so 1 picture at least, 3-4 typically)
cheers
Why not just create a layout that can be used for each row of your
ListViewand populate the different elements of that layout based on the data for the row?For example, if each item has a maximum of 4 attributes, add four ImageViews to the layout, and set their drawables and visibility in
getViewbased on the position passed in.