Skip to content

Instantly share code, notes, and snippets.

@lekaha
Created July 10, 2018 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lekaha/3f81243288eacfdaf4e6ce7fbef973c0 to your computer and use it in GitHub Desktop.
Save lekaha/3f81243288eacfdaf4e6ce7fbef973c0 to your computer and use it in GitHub Desktop.
Glide using tips
@GlideModule
class MyAppGlideModule: AppGlideModule() {
override fun applyOptions(context: Context, builder: GlideBuilder) {
super.applyOptions(context, builder)
builder.setDefaultRequestOptions(
RequestOptions()
.format(DecodeFormat.PREFER_ARGB_8888)
.diskCacheStrategy(DiskCacheStrategy.DATA)
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment