一、glide的使用:git
添加依賴:github
- compile 'com.github.bumptech.glide:glide:3.7.0'
調用代碼:ide
- ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
-
- Glide.with(this).load("http://goo.gl/gEgYUd").into(imageView);
二、添加OKHttp3集成:this
- compile 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
- compile 'com.squareup.okhttp3:okhttp:3.1.2'
三、出現的問題.net
- You must not call setTag() on a view Glide is targeting
解決方案:把seTag調用改成setTag(key,Object)調用:blog
- ImageView.setTag(R.id.ImagViewId,saveObject);
參考:http://blog.csdn.NET/kyleceshen/article/details/49806267get
https://github.com/bumptech/glideit