Created
April 5, 2018 10:39
-
-
Save Nonda95/2942cc419a9ad0f7c01eb6229be35ed8 to your computer and use it in GitHub Desktop.
Add don't transform option to Glide
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
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