if ViewPager2 itemCount > 3 , such as 4 , ViewPager2 childs is SwipeRefreshView + RecyclerView , position 0 , pull refresh network data(before request SwipeRefreshView.isRefreshing = true , after network data complete , SwipeRefreshView.isRefreshing = false ) , fast switch to lastIndex , and switch back in a while , repeat the opera , sometimes the SwipeRefreshView can't pull refresh .
if i set ViewPager2.offscreenPageLimit = 1 , it work well , but , when ViewPager2.itemCount = 4 , i must set ViewPager2.offscreenPageLimit = 2.......
if ViewPager2 itemCount > 3 , such as 4 , ViewPager2 childs is SwipeRefreshView + RecyclerView , position 0 , pull refresh network data(before request SwipeRefreshView.isRefreshing = true , after network data complete , SwipeRefreshView.isRefreshing = false ) , fast switch to lastIndex , and switch back in a while , repeat the opera , sometimes the SwipeRefreshView can't pull refresh . if i set ViewPager2.offscreenPageLimit = 1 , it work well , but , when ViewPager2.itemCount = 4 , i must set ViewPager2.offscreenPageLimit = 2.......
https://user-images.githubusercontent.com/7857673/123208745-39184c80-d4f2-11eb-8ee2-86120832c8c8.mp4
the record SwipeRefreshView.isRefreshing=1 , some code :