Skip to content

Instantly share code, notes, and snippets.

@Nonda95
Created April 5, 2018 10:39
Show Gist options
  • Save Nonda95/2942cc419a9ad0f7c01eb6229be35ed8 to your computer and use it in GitHub Desktop.
Save Nonda95/2942cc419a9ad0f7c01eb6229be35ed8 to your computer and use it in GitHub Desktop.
Add don't transform option to Glide
fun ImageView.load(url: String, onLoadingFinished: () -> Unit = {}) {
...
val requestOptions = RequestOptions.placeholderOf(R.drawable.placeholder)
.dontTransform()
Glide.with(this)
.load(url)
.apply(requestOptions)
.listener(listener)
.into(this)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment