this error apear when i add bitmap image in hashmap to display it in listview
any help please??
hm = new HashMap<String, Object>();
hm.put(IMAGE, ops);
hm.put(TITLE, text);
hm.put(CARDS_COUNT, cardsCount +" Stampii");
items.add(hm);
}
final SimpleAdapter adapter = new SimpleAdapter(this, items, R.layout.main_listview,
new String[]{TITLE, CARDS_COUNT, IMAGE}, new int[]{ R.id.main_name, R.id.main_info, R.id.main_img});
listView.setAdapter(adapter);
It sounds as you are adding the
Bitmapobject to the map, but what you should add is a uri that points to the bitmap (e.g. a file uri, a content uri, …) not the bitmap it self. You can also add an integer resource id (e.g. R.drawable.my_bitmap).