views-widgets-samples
views-widgets-samples copied to clipboard
currentItem of viewPager2 doesn't work properly.
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
Attach Listener to tabLayout