2012-07-26 183 views
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为数组?

回答

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)); 
}