Skip to content
Advertisement

Config Glide library for caching

How to set glide in the android project so that once images download to the app each time then displayed by the glide cache

Glide.with(context).load(url).into(imageView);

Advertisement

Answer

Set your Glide object by providing the request options and that’s it. Glide will take care of caching for you. Happy coding with Glide “A simple and feature rich image loading library.”

val requestOptions = RequestOptions().diskCacheStrategy(DiskCacheStrategy.ALL)
Glide.with(context).load(url).apply(requestOptions).into(imageView)
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement