Created
October 6, 2018 20:47
-
-
Save shibbirweb/9cb183f9eb9796ee4fe98d2f172b50c9 to your computer and use it in GitHub Desktop.
Using RequestOptions in Glide v4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//android studio dependency implementation 'com.github.bumptech.glide:glide:4.8.0' | |
RequestOptions options = new RequestOptions() | |
.centerCrop() | |
.placeholder(R.drawable.default_avatar) | |
.error(R.drawable.default_avatar) | |
.diskCacheStrategy(DiskCacheStrategy.ALL) | |
.priority(Priority.HIGH); | |
Glide.with(mContext).load(imgUrl) | |
.apply(options) | |
.into(picThumbnail); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment