Skip to content

Instantly share code, notes, and snippets.

@jafar260698
Created August 11, 2020 04:58
Show Gist options
  • Save jafar260698/b3b4007f1089334d306bedc9f87ea2ad to your computer and use it in GitHub Desktop.
Save jafar260698/b3b4007f1089334d306bedc9f87ea2ad to your computer and use it in GitHub Desktop.
val requestOptions = RequestOptions()
.placeholder(R.color.lightwhite)
.error(R.color.red_100)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.centerCrop()
holder.image.apply {
Glide.with(context)
.applyDefaultRequestOptions(requestOptions)
.load(Uri.parse(data[position].food_image))
.transition(DrawableTransitionOptions.withCrossFade())
.into(url)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment