0

I have images in my database and I have converted them into BLOB but I can't display them on a gridview or listview with other information like this: price, QTY, Description, image

Jason Sturges
  • 15,855
  • 14
  • 59
  • 80
Djkgotso
  • 130
  • 2
  • 4
  • 15
  • 1
    Instead of storing images in to database, i would like to suggest you to store them on sd card and store the path of image in to DB. please visit my [answer](http://stackoverflow.com/a/9141116/996493). – Lucifer Jun 01 '12 at 14:25

1 Answers1

0

Something like this in your cursor adapter:

ImageView myImage = (ImageView) findViewById(R.id.myImage);
byte[] bb = cursor.getBlob(cursor.getColumnIndex(MyBaseColumn.MyTable.ImageField));
myImage.setImageBitmap(BitmapFactory.decodeByteArray(bb, 0, bb.length));
Barak
  • 16,318
  • 9
  • 52
  • 84
  • Well, we couldn't know that since you didn't post any code. In that case I have no idea what your issue is. – Barak Jun 01 '12 at 15:30