I am having two fragments which fetches the images from server using volley library and display the image and image name in the recyclerview. My requirement is to cache the images into a folder while fetching the images from url and load the same images into the recyclerview when there is no internet availabe.any help will be appreciated...
Asked
Active
Viewed 59 times
3 Answers
0
You can use Glide, Fresco ,Picasso for image caching . If you are more interested in knowing their differences . there is a link .

Community
- 1
- 1

shrestha rohit
- 2,920
- 2
- 13
- 20
0
Use Glide: it caches the image in memory once loaded, u can use it until app data is cleared. One of the best libraries.
add this to build gradle
dependencies {
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:support-v4:19.1.0'
}
then use glide to load image
Example :
Glide.with(this).load(R.drawable.sample).into(imageView);

Victor
- 4,171
- 1
- 29
- 37
-
am using the recyclerview . how to load the cached images into recyclerview when there is no internet availabe... – user2645941 Nov 08 '16 at 04:52
-
Glide automatically caches the image once its loaded .. it will show up even if there is no network. If i helped u to solve the issue , please select my replay as answer. if u have any doubts feel free to ask :) – Victor Nov 10 '16 at 10:53