user3609556
user3609556

Reputation: 17

Save data and view even after closing application and when opening it again don't load data and view again

I have a listview that get posts and data of users, I want to save my data and view even if I closed my application and re-opened it, I need it to open the same data that was loaded and the same view and don't load data and view again just like facebook does. Can anybody help me?!

Upvotes: 0

Views: 1114

Answers (2)

Jitender Chaudhary
Jitender Chaudhary

Reputation: 701

Save your posts in Android Sqlite Database and then load data from sqlite then make a network request.

Sqlite Tutorial

Upvotes: 1

Ogen
Ogen

Reputation: 6709

Sounds to me like you need to store the information on the actual phone.

Use shared preferences

Upvotes: 1

Related Questions