2012-07-26 178 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)); 
}