Android: How to get bitmap from HashMap object? -
i have hashmap in stored images bitmap format. problem how images again?
in details, here in hasmap, stored bitmap image object.
arraylist<hashmap<string,object>> mimglist = new arraylist<hashmap<string,object>>(); bitmap img = imgloader.decodesampledbitmapfactoryfromurl(x,x,x,x); hashmap<string, object> map = new hashmap<string, object>(); map.put(tag_img, img); map.put(tag_name, name); map.put(tag_id, cont_id); mimglist.add(map);
i use hashmap in listview diplay img , text, everything's fine. need display of images in imageview, don't know how image bitmap in hashmap becoming object.
i tried use:
bitmap bmp = mimglist.get(x).get(tag_img);
but got actualy object not bitmap. how should bitmap? or there other way can display picture on alertdialog? thanks!
turns out no 1 answered question...but end converting bitmap drawable can save them hashmap , them when want.
Comments
Post a Comment