I have implemented a recyclerview with some videos (say 10). Clicking on any item opens a viewpager2 which is on some other activity
with all the items and
the clicked one (from recyclerview
) is shown. After that user can scroll to other item from there only. Everything is working fine.
Only the problem is with the scrolling when recyclerview item click where is the viewpager2 is opened.
Whenever any item is selected(10th). The viewpager opens first and the scroll itself to the (10th) position. I want to open 10th position of viewpager2 directly without scrolling. Any help would be appreciated.
I have tried setting the current item as
viewPagerReview.currentItem = recyclerviewItemSelectedPosition
but if the current item is last position of the recyclerview then viewpager also scrolls till last position.