方式:通过引入第三方库:实现网络加载图片
API文档:https://github.com/bumptech/glide
实现步骤
1、在app/buid.gradle下添加内容
repositories {
mavenCentral()
}
dependencies {
compile 'com.github.bumptech.glide:glide:4.0.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
}
2、项目添加网络权限:在AndroidMainifest.xml文件中的<mainifest>
中添加以下
<