使用Glide以及OkHttp集成
集成 以及 okHttp Glide 使用
2023-09-11 14:17:21 时间
1、glide的使用:
添加依赖:
- compile 'com.github.bumptech.glide:glide:3.7.0'
调用代码:
- ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
- Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);
2、添加OKHttp3集成:
- compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
- compile 'com.squareup.okhttp3:okhttp:3.1.2'
3、出现的问题
- You must not call setTag() on a view Glide is targeting
解决方案:把seTag调用改为setTag(key,Object)调用:
- ImageView.setTag(R.id.ImagViewId,saveObject);
参考:http://blog.csdn.NET/kyleceshen/article/details/49806267
https://github.com/bumptech/glide
相关文章
- SpringMVC + spring3.1.1 + hibernate4.1.0 集成及常见问题总结
- 我的Swagger实例ASP.NET MVC 集成SwaggerUI ,Swashbuckle v5.6.0配置, api描述
- Android 小米推送服务集成
- 产品迭代发布如何更快速?阿里持续集成与持续交付实践之路全解析
- flink针对hadoop 3.x的支持及集成方式
- 微服务(六)-SpringCloud Gateway集成登录校验
- 【HMS Core】集成地图服务报错误码403
- 【AR Engine】集成AR Engine,ARSession.update方法抛出ARFatalException
- Android 快速集成文档校正能力 超简单
- 05-jenkins与SonarQube代码审查集成
- ABP理论学习之NHibernate集成
- 微服务学习一:idea中springboot集成mybatis
- 《计算机系统:系统架构与操作系统的高度集成》——1.2 计算机系统中的抽象层次
- 手把手学习springcloudalibaba:❤️Nacos服务注册中心集成实战❤️
- 【HMS Core】集成地图服务报错误码403
- 【JAVA UI】HarmonyOS如何集成picasso加载网络图片
- 【HarmonyOS】【JAVA UI】HarmonyOS 如何集成KLog
- 曹工说Spring Boot源码(14)-- AspectJ的Load-Time-Weaving的两种实现方式细细讲解,以及怎么和Spring Instrumentation集成