可能重複:
how to implement lazy loading of images in gridview在Android中從url獲取多個圖像?
如何從Android中使用可繪製網址提取多張圖片?
private Drawable LoadImageFromWebOperations(String url) {
try {
InputStream is = (InputStream) new URL(url).getContent();
Drawable d = Drawable.createFromStream(is, "icon");
return d;
} catch (Exception e) {
System.out.println("Exc=" + e);
return null;
}
}
我使用這個函數返回繪製的圖像,但我沒有得到如何綁定圖像的GridView的列表..
請幫助我。
試試看這個[鏈接](https://github.com/nostra13/Android-Universal-Image-Loader)。它爲你開箱即用很多工作 –