06-13-2012 02:09 AM
i want to create a list of images (image 0.png, 1.jpg, 2.gif etc.) and i want to put them in a ListField, in a thread i have the following
JSONArray resImage = new JSONArray(getJsonresponse("http://localhost/blackb erry/sampledata.json"));
int chkImg = resImage.length();
_bitmap = new Bitmap[chkImg];
for (int x = 0; x < chkImg; x++) {
_bitmap[x] = connectServerForImage(resImage.getJSONObject(x).ge tString("image_url"));
}
public void drawListRow (ListField listField, Graphics g, int index, int y, int w) {
g.drawBitmap(xText, y + yText, 80, 200, _bitmap[index], 0, 0);
}but it throws null exception, how to get bitmap array in drawListRow ?
06-13-2012 02:17 AM
06-13-2012 02:28 AM
Yes, my networking on a separate thread. Is this the proper way to make a list of images?
06-13-2012 02:49 AM