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
Asked
Active
Viewed 1,431 times
0
-
1Instead 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 Answers
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