-3

I'm using UniversalImageLoader library to load the images into the GridView. And i'm having the images in the form of byte array.

How to use UniversalImageLoader with ArrayList of byte arrays

I'm getting the byte array from the my SQlite Database.

user3607798
  • 769
  • 2
  • 7
  • 15
  • I suggest you to use Android Query, its the perfect solution to load images. – Pratik Dasa Jun 10 '14 at 11:49
  • Any reasons why it is downvoted!! UIL is taking **uri** as arguement. is there any chances for using **byte array** – user3607798 Jun 10 '14 at 12:08
  • 1
    Look here - http://stackoverflow.com/questions/16231489/can-universal-image-loader-for-android-work-with-images-from-sqlite-db Maybe it helps. – nostra13 Jun 10 '14 at 14:24

1 Answers1

0

Try this method use to byte array object pass this method and bitmap arraylist in store bitmap and pass CustomGridViewAdapter in pass this array list in Adapter and 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); // this bitmap store in Bitmap ArrayList in add


    }
Rutvij
  • 493
  • 3
  • 10