I have 2 activities in a ViewPager. Activity A adds items to a database, and Activity B displays those added items in a ListView. I have a method called GetFavs() which connects to the database and pulls the data and displays the items.
How can I call GetFavs() method each time activity B is displayed in ViewPager?
I have 2 activities in a ViewPager. Activity A adds items to a database,
Share
I think you can create static adapter in B and each time when you add new items in A you can do smth like this
With this code you can not load full data each time you see B.
Also you can pass the whole B context and create method to add new item in it.