图片加载框架
来源:互联网 发布:java线程教程 编辑:程序博客网 时间:2024/06/11 03:57
图片加载框架 Fresco/Glide/Picasso
一、Glide的基本使用:(地址:https://github.com/Masterminds/glide)
1.引包:
dependencies { compile 'com.github.bumptech.glide:glide:3.7.0' compile 'com.android.support:support-v4:19.1.0'}
如需代码混淆
-keep public class * implements com.bumptech.glide.module.GlideModule-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** { **[] $VALUES; public *;}# for DexGuard only-keepresourcexmlelements manifest/application/meta-data@value=GlideModule
ImageView imageView = (ImageView) findViewById(R.id.my_image_view); Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);
二、Picasso的基本使用(地址:https://github.com/square/picasso)
1.引包
compile 'com.squareup.picasso:picasso:2.5.2'
代码混淆添加:-dontwarn com.squareup.okhttp.**
开始使用:
ImageView imageView = (ImageView) findViewById(R.id.my_image_view);Picasso.with(this).load("http://goo.gl/gEgYUd").into(imageView);三、Fresson(地址:https://github.com/facebook/fresco)
1.引包:
compile 'com.facebook.fresco:fresco:1.3.0'
首先在自定的Appcation中初始化并在AndroidManifest文件中使用
Fresco.initialize(this);
在布局文件中添加控件:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/baseline_jpeg"
android:layout_width="match_parent"
android:id="@+id/baseline_jpeg"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
/>
SimpleDraweeView drawView=(SimpleDraweeView)findViewById(R.id.baseline_jpeg);
drawView.setImageUri("image_path");//设置图片地址(可以是地址、资源ID),支持jpg、webp、gif图片等
1 0
- 图片加载框架
- 图片加载框架大合集
- 图片加载框架Glide
- Android图片加载框架
- facebook 图片加载框架
- 图片加载框架
- Imageloader图片加载框架
- Fresco图片加载框架
- 图片加载框架
- 简述图片加载框架
- 打造图片加载框架
- 图片加载框架-Fresco
- 图片加载框架-Picasso
- 图片加载框架-ImageLoader
- Android图片加载框架
- Fresco图片加载框架
- android图片加载框架
- 常用图片加载框架
- Learn UML with JUDE
- 非滤波单目视觉SLAM系统
- 部分HTML知识点
- windows搭建ftp服务器客户端--注意事项
- 【LeetCode】最长相同前缀
- 图片加载框架
- 每天一个linux命令(49):at命令
- VMwareWorkstation10 中安装Centos6.5(64位)图文并茂详细步骤
- Codeforces Round #410 (Div. 2)
- JavaScript模板引擎
- 两个小程序对数组的思考
- 剑指offer-面试题21-包含min函数的栈
- [Leetcode]_19 Remove Nth Node From End of List
- 一步一步学springboot (四)日志管理