2012-01-25 97 views

回答

3

费多尔的代码(从我读过)藏汉使用文件缓存的内存高速缓存缓存下载的文件...

所以只需使用

FileCache fileCache = new FileCache(context); 
File bmp = fileCache.getFile(url); 
//convert the File object to a Bitmap object using BitmapFactory (see decodeFile() method in ImageLoader) 

MemoryCache memCache = new MemoryCache(context); 
Bitmap bmp = memCache.get(url) 

注:如果同时返回null,那么你将不得不再次下载它。

+1

我在我的手机上。所以我没有访问源。但请检查Imageloader是否具有“getBitmap”类型的函数。 – st0le

+0

Thnx很多,getBitmap方法是我正在寻找,完美的作品! – ZealDeveloper

相关问题