0
List<String> url = new ArrayList<String>();
public Bitmap[] thumbs = { };

我从我的方法中获取图像fetchImage(String url)

for (int i = 0; i < (url.size()); i++) {
   /* I fetch image with param String URL and return as Bitmap */
   Bitmap photo = fetchImage(url.get(i));
}

如何推Bitmap photoBitmap[] thumbs数组?

4

1 回答 1

2

执行以下操作:

List<String> url = new ArrayList<String>();
public Bitmap[] thumbs = new Bitmap[url.size()];

for (int i = 0; i < (url.size()); i++) {
   /* I fetch image with param String URL and return as Bitmap */
   thumbs[i] = fetchImage(url.get(i));
}
于 2012-07-26T05:38:39.553 回答