1
我使用Fedor懒惰的Loader Adapter在列表视图中显示图像。Android Fedor的Lazy Load将图像传递给其他活动
我想传递点击新行的图像(已下载)。我不想再次下载图像。 这怎么办?
编号:Lazy load of images in ListView
我使用Fedor懒惰的Loader Adapter在列表视图中显示图像。Android Fedor的Lazy Load将图像传递给其他活动
我想传递点击新行的图像(已下载)。我不想再次下载图像。 这怎么办?
编号:Lazy load of images in ListView
费多尔的代码(从我读过)藏汉使用文件缓存的内存高速缓存缓存下载的文件...
所以只需使用
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
,那么你将不得不再次下载它。
我在我的手机上。所以我没有访问源。但请检查Imageloader是否具有“getBitmap”类型的函数。 – st0le
Thnx很多,getBitmap方法是我正在寻找,完美的作品! – ZealDeveloper