Android 网络图片加载之cude 框架
2015-04-15 09:03
344 查看
偶然发现了这个框架,阿里图片加载用的这个框架。非常简单操作步骤。
1.首先下载软件包,直接搜Cube ImageLoader 这个。
2.加入jar文件
3.使用前的配置:
1.首先,创建一个ImageLoader:
2.用findViewById()找到要加载图片的ImageView:
3.加载图片。就一句代码:
1.首先下载软件包,直接搜Cube ImageLoader 这个。
2.加入jar文件
3.使用前的配置:
public class CubeApplication extends Application { @Override public void onCreate() { super.onCreate(); // other code // .. Cube.onCreate(this); } @Override public void onTerminate() { super.onTerminate(); // other code // ... Cube.onTerminate(); } }
1.首先,创建一个ImageLoader:
Context context; ImageLoader imageLoader = ImageLoaderFatory.create(context);
2.用findViewById()找到要加载图片的ImageView:
CubeImageView imageView = (CubeImageView) view.findViewById(R.id.iv_item_image_list_big);
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" > <!-- 用定制的CubeImageView --> <in.srain.cube.image.CubeImageView android:id="@+id/iv_item_image_list_big" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="fitCenter" /> </LinearLayout>
3.加载图片。就一句代码:
imageView.loadImage(imageLoader, url);
相关文章推荐
- Android 网络图片加载之cude 框架
- Android 网络图片加载之cude 框架
- Android网络框架-Volley(三) 加载图片
- Android_开源框架_AndroidUniversalImageLoader网络图片加载
- Android:android的框架区别(网络框架、图片异步加载与缓存框架、数据框架)特点整理
- Android开源框架Universal-Image-Load网络图片加载
- 网络图片加载的封装-(从零开始搭建android框架系列(4))
- Android之Volley框架加载网络图片的三种方式
- 一套整合主流HTTP网络、图片加载、MVP(RxJava2+Dagger2)架构的快速高效的开发框架RxEasyAndroid
- Android_开源框架_AndroidUniversalImageLoader网络图片加载
- 转 Android_开源框架_AndroidUniversalImageLoader网络图片加载
- android Volley请求框架的简单使用——访问网络和加载图片
- Android开源框架--AndroidUniversalImageLoader网络图片加载
- Android_开源框架_AndroidUniversalImageLoader网络图片加载
- 网络图片加载的封装-(从零开始搭建android框架系列(4))
- android网络开源框架volley(四)——谈谈图片加载
- android网络开源框架volley(四)——谈谈图片加载续——九张图片相册的展示(微信微博等)
- 网络图片加载的封装【从零开始搭建android框架系列(4)】
- Android网络图片加载框架:Universal-ImageLoader简介
- Android 中网络图片加载(包括本地图片的加载) 框架 universal image loader 的简单使用