android - Load images from byte array into the gridview -
i'm using universalimageloader library load images gridview. , i'm having images in form of byte array.
how use universalimageloader arraylist of byte arrays
i'm getting byte array sqlite database.
try method use byte array object pass method , bitmap arraylist in store bitmap , pass customgridviewadapter in pass array list in adapter , set bitmap in imageview
void setimage2(byte[] byteimage2) {
bitmapfactory.options options = new bitmapfactory.options(); options.indither = false; options.injustdecodebounds = false; options.inpreferredconfig = bitmap.config.argb_8888; options.insamplesize = 1; options.inpurgeable = true; options.inpreferqualityoverspeed = true; options.intempstorage = new byte[32 * 1024]; bitmap bmp = bitmapfactory.decodebytearray(byteimage2, 0, byteimage2.length, options); // bitmap store in bitmap arraylist in add }
Comments
Post a Comment