T
T
Tsuzukeru2021-04-28 18:11:40
Android
Tsuzukeru, 2021-04-28 18:11:40

Why is picasso loading images WITHOUT an internet connection?

There is an application consisting of preview and detail fragments.
The preview fragment receives the addresses of the pictures, displays them as a list on the screen and stores them in the ViewModel. Clicking on the ViewHolder navigates to the detailView using the navigation component. The link to the image is also passed through it.

imageViewItem.findNavController().navigate(PreviewFragmentDirections.actionPreviewFragmentToDetailItemFragment(uri.toString()))


I'm trying to handle internet connection errors and accidentally discovered an interesting thing.
When the list of images is loaded into PreviewFragment - I turn off the Internet and switch to detailView, but the picture is loaded and displayed on the screen. What is this magic?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
illuzor, 2021-04-28
@Tsuzukeru

Because after loading the images are stored in the cache

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question