I am using a custom view from here. I want to disable user interactions with the view pager 2 using this: But, it moves when I click on a dot of that view. I tried to disable that using this: But, that does not seem to work. Then how can we disable clicks on it? Answer Library uses setOnClickListener internal…
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 confus…
ViewPager2 not working properly with Fragments and click events
I just wanna know if I’m doing something wrong since I’m kinda new to all this. If there is anything else that you’ll like me to add just let me know. This is the repo branch where I’m trying to implement the ViewPager if you wanna see all the code. Context So I have 4 Categories repre…
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 view…