Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的数据库中有图像,我已将它们转换为 BLOB,但我无法在 gridview 或 listview 上显示它们以及其他信息,例如:价格、数量、描述、图像
在您的光标适配器中是这样的:
ImageView myImage = (ImageView) findViewById(R.id.myImage); byte[] bb = cursor.getBlob(cursor.getColumnIndex(MyBaseColumn.MyTable.ImageField)); myImage.setImageBitmap(BitmapFactory.decodeByteArray(bb, 0, bb.length));