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 internally
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
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 represented with Fragments, each
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