Glide是一款由Bump Technologies开发的图片加载框架,使我们可以在Android平台上以极度简单的方式加载和展示图片。要想使用Glide,必须将这个库引入我们的项目中,对于Android Studio用户,要导入一下依赖:
compile 'com.github.bumptech.glide:glide:3.7.0'
如果你还在使用Eclipse,那就去下载Glide的jar包吧,下载好后导入。
另外,在Glide中需要用到网络功能,所以必须在AndroidManifest.xml中加入网络请求的权限
<uses-permission android:name="android.permission.INTERNET" />
-----加载图片-----
现在我们就尝试一下用Glide加载图片吧。比如这是一张完美景色图片地址:
http://cn.bing.com/az/hprichbg/rb/Dongdaemun_ZH-CN10736487148_1920x1080.jpg
那么首先&#