A similar question has already been asked
"I have viewPager with several views. the default behavior of viewPager is that the first item is displayed first, then swiping right to left displays the second view right to the current view etc.
the behavior i want is that after the first item is displayed, swiping left to right will display the next view left to the current item. "
But in my case, the problem is a little different. My first page must contain a list of item. On that list view, i have add a feature---- u swipe an item right to left, it displays certain options like iOS. So default view pager behavior is creating conflicts with this list behavior.
My ViewPager contains 2 fragments. Fragment 1 contains list of items. Fragment 2 contains item details.
I cannot set current item
as the second fragment.
Tried gesturelistner, with it i can get the direction of swipe but was not able to reverse it.
So i need to reverse the default swipe direction of viewpager.