Search code examples
javaandroidandroid-networking

Get objects queue from network and walk prev/next


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


Solution

  • 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.