0

I am trying to get notified if the user swipes up or down on the viewpager. View Pager is showing a list of data coming from an API.

I have been through few answers here on SO including this but they seems a little complex and have very little explanation or are outdated. I am trying to understand are there any other ways to solve this in current scenario using Kotlin.

Would like to know if there are any pre defined methods in ViewPager or what should be my approach to tackle this.

oyeraghib
  • 878
  • 3
  • 8
  • 26
  • Didn't find any direct callback to know the swipe up or down gestures in viewpager. But what helped me in solving my issue was passing the item's position when moving to next fragment and then using that index to go to the same position in ViewPager – oyeraghib Feb 26 '23 at 04:35

0 Answers0