Skip to content
Advertisement

Tag: android-viewpager2

Issue on implementing ViewPager2 with FragmentStateAdapter

I am from ViewPager with FragmentPagerAdapter which has a very straight forward implementation like this. Parent Fragment Android recommends moving away from ViewPager and deprecating the beloved FragmentPagerAdapter, now I am trying to work with ViewPager2 with FragmentStateAdapter but having a lot of confusion and difficulty in terms of how it works. These is my implementation Normally we could just

How to fix Scrolling issue of horizontal ViewPager2 and RecyclerView that are inside a vertical RecyclerView?

I have a RecyclerView (say, rootRecyclerView) that can have different kinds of rows depending on some API response. I implemented one of them is a horizontal ViewPager2 and another one is implemented with horizontal RecyclerView (say, childRecyclerView). The rootRecyclerView swipes vertically whereas the viewPager2 and childRecyclerView swipes horizontally. The Problem: When I swipe on the screen, if the swipe is

Advertisement