I have application, which loads data from network on press Next button. I want add prev button and possibility to show previous data without request in network. How can I realize this? I looking at Volley library, but I don't know have Volley this feature or not

有帮助吗?

解决方案

Volley caches results by default once the request is completed. So yes, you could use volley to do what you want. Here is a link to a tutorial.

Another option would be to store the result from the request in a SQLite database and retrieve it if the user goes back to the previous screen. If you are using Volley I will just use their cache to retrieve the data.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top