Android,如何从url延迟加载图像并将其持久地缓存在Gallery小部件中?

问题描述

|                                                                                                                   关闭。这个问题需要更加集中。它当前不接受答案。                                                      

解决方法

这是这样的: 延迟加载ListView中的图像 查看第二个答案中的演示,对我有很大帮助!     ,试试这个代码。通用图像加载器。   https://github.com/nostra13/Android-Universal-Image-Loader     ,尝试使用本教程Android:帮助将ListView适配器与ImageLoader类(LazyList)配合使用 希望对您有帮助!     ,
    You have to use Picasso. 

    it\'s easy to use

    downlod latest jar from  http://square.github.io/picasso/

    simply load image used below code

    Picasso.with(context)
               .load(url)
               .placeholder(R.drawable.placeholder)
               .resize(imgWidth,imgHeight)
               .centerCrop()
               .into(image);
    

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...