问题
In my android app, I am using three tabs with three different fragments containing listviews. My problem is, 1) Listview in all fragment is loading (initialising) every time on tab click
2) I am using lazy loading for pagination (load more items at bottom on scroll), and in this case for first time loading listview with data from server not showing progress bar but on click on listview/or blank view, progress bar will be visible. So is there any different library for avoiding this.
Thank you in advance.
回答1:
set view pager off screen limit
pager.setOffscreenPageLimit(2);
来源:https://stackoverflow.com/questions/29965611/in-fragment-tabhost-listview-loading-everytime-on-tab-click