KImageLoader图片加载框架
KImageLoader,具有某些新特性的图片加载框架
运行效果:
特点
同时为多个ImageView加载同一张图片
指定图片加载来源
指定图片加载质量
指定是否需要缓存到内存中或者磁盘中
设置图片加载任务优先级
监听图片加载过程
用法
imageLoader = ImageLoader.getInstance(); ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder() .setDiskCacheMaxSize(2 * 1024 * 1024 * 1024L) //指定最大磁盘缓存为2GB .setDiskCachePath("/sdcard/KImageLoader") //指定磁盘缓存目录 .isAutoCreateCacheDir(true) //如果磁盘缓存目录不存在自动创建 .setMemoryCacheManager(null) //指定内存缓存管理器 .setDiskCacheManager(null) //指定磁盘缓存管理器 .setDownloader(null) //指定网络下载器 .build(); imageLoader.setImageLoaderConfiguration(config); ImageLoaderOptions opts = new ImageLoaderOptions.Builder() .cacheInMemory(true) //允许缓存到内存缓存中 .cacheInDisk(true) //允许缓存到磁盘缓存中 .setLoadingDrawableId(R.drawable.ic_launcher) //加载图片过程中显示的图片 .setLoadedfailDrawableId(R.drawable.image_emoticon10) //加载失败时显示的图片 .loadFromMemory(true) //允许从内存缓存中加载 .loadFromDisk(true) //允许从磁盘缓存中加载 .loadFromNetwork(true) //允许从网络上加载 .setBitmapOptions(null) //指定加载的图片质量 .build(); String url = "http://img2.imgtn.bdimg.com/it/u=2702123953,998736265&fm=21&gp=0.jpg"; ImageView imageView = (ImageView) findViewById(R.id.iv); imageLoader.displayImage(getApplicationContext(), url, imageView, opts);
评论
jPicture图片加载
jPicture是一个jQuery插件,它可以在右视图端口上加载图片。jPicture只在页面上显示最合适的图片版本。示例代码:$('#super-pic').jp({ 'test_imgs/w
jPicture图片加载
0
LazySizesJS 图片加载器
LazySizes用于图片延迟加载,但是不会影响SEO。LazySizes内置很多可扩展组件。可以根据图片大小、网络带宽等因素,优先加载占用资源较少的图片。如果你想开发响应式网站,LazySizes应
LazySizesJS 图片加载器
0
ImageLoaderSampleImageView异步加载图片
这个可以实现ImageView异步加载图片,内存缓存,文件缓存,imageview显示图片时增加淡入
ImageLoaderSampleImageView异步加载图片
0
LoadingProgress-Android图片加载进度条
LoadingProgress是一个加载网络图片的进度条。当耗时间特别长时,注入进度条是个不错的效果,可以实现类似QQ和微信的那种加载图片效果。我看了一下网上加载进度条的方式,几乎都是自定义继承ima
LoadingProgress-Android图片加载进度条
0
ImageLoaderSampleImageView异步加载图片
这个可以实现ImageView异步加载图片,内存缓存,文件缓存,imageview显示图片时增加淡入淡出动画。解决了:1.listview加载oom问题2.listview加载时卡顿的现象3.list
ImageLoaderSampleImageView异步加载图片
0