views-widgets-samples icon indicating copy to clipboard operation
views-widgets-samples copied to clipboard

currentItem of viewPager2 doesn't work properly.

Open tjrkdgnl opened this issue 4 years ago • 0 comments

hello!! Sir

I have problem for currentItem of ViewPager2. currently, I have connected the viewPager2 and the tabLayout through tablayoutMediator. and I attached OnTabSelectedListener to the tabLayout. also I made a log inside onTabSelected method to check the value of cuurentItem. At this point, if I swipe the viewPager2, the currentItem works fine. But when I touch the tab, currentItem doesn't work properly..

please let me know what's wrong. thank you.

Environment version of android studio is = 3.6.3 release version of viewPager2 is 1.0.0

Connecting viewPager2 and tabLayout image

Attach Listener to tabLayout image

tjrkdgnl avatar Nov 25 '20 05:11 tjrkdgnl