Glide 4.x基本使用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Lamphogani/article/details/78061157
Glide 4.x基本使用


第一步


allprojects {
    repositories {
        mavenCentral()
        maven { url 'https://maven.google.com' }
    }
}


第二步


compile 'com.github.bumptech.glide:glide:4.1.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.1.1'


第三步


@GlideModule
public class MyAppGlideModule extends AppGlideModule {
//自定义模块,用于更改Glide配置
}


第四步


点击 Make Project


第五步


GlideApp.with(mContext)
.load(item.getAlbumImageUrl())
.placeholder(R.mipmap.ic_launcher)
.error(R.mipmap.ic_launcher)
.transition(new DrawableTransitionOptions().crossFade(200))
.into((ImageView) viewHolder.getView(R.id.iv_item_img));


参考文章 http://blog.csdn.net/github_33304260/article/details/72526237

猜你喜欢

转载自blog.csdn.net/Lamphogani/article/details/78061157