I have successfully implemented sectioned listview, but now I'm facing a problem i.e. each row in ListView
has some Textview
plus ImageView
.
The image in ImageView
is only displayed when I use R.drawalbe.myimage
i.e. when I assign an integer id.
But it doesn't work when I actually assign an Bitmap or Drawable. Basically these bitmaps are downloaded from internet, how can I make then appear in sectioned ListView
.
// this works
security.add(createItem(v1, v2, v3, v4, v6, R.drawable.add));
// this doesnt work
Bitmap b; // loaded from somewhere
security.add(createItem(v1, v2, v3, v4, v6, b));
public Map<String, ?> createItem(String title, String caption, String date, String hrs, String lnk, int obj)
{
Map<String, Object> item = new HashMap<String, Object>();
item.put(ITEM_TITLE, title);
item.put(ITEM_CAPTION, caption);
item.put(ITEM_DATE, date);
item.put(VISIBLE_DATE, hrs);
item.put(LINK, lnk);
item.put(IMAGE, obj);
return item;
}