per page: onCreate calls two tabs each time one tab is selected
It explains how ABS (actually ViewPager) works so that ViewPager can scroll. It is clear that you must create at least one of the previous / next pages at the same time.
Is it possible to "cache" more than just the previous / next types (fragments), in a sense:
I am on page 1 and I have a network call to get some data (is this done in Activity, not in Fragment - btw. Is this normal?)
switch to page 2 and then
switch to page 3 and then
go to page 1 = Here my page is recreated (using some caching, though, BUT, I donβt need, if possible, rest)
So, it would be nice to cache all pages. How to do it If possible in the current version (4), or will it be some new feature?
Or even the best question, how to delay / disable the destruction of views?
source share