material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

[Tab] Skip calling ViewPager2#setCurrentItem() when the active page i…

Open archer-n opened this issue 1 year ago • 2 comments
trafficstars

Closes https://github.com/material-components/material-components-android/issues/1865.

The current TabLayoutMediator implementation has an issue that it invokes ViewPager2#setCurrentItem() when a user navigates between pages by a swipe operation. The method call aborts the scrolling animation that the user made and starts a new scroll animation when smoothScroll = true, or stops scrolling immediately when smoothScroll = false. Don't forget:

  • [x] dentify the component the PR relates to in brackets in the title. Link to GitHub issues it solves. (closes
  • [x] https://github.com/material-components/material-components-android/issues/1865)
  • [x] Sign the CLA bot. You can do this once the pull request is opened.

archer-n avatar Dec 12 '23 02:12 archer-n

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Dec 12 '23 02:12 google-cla[bot]

Hi Dan the change itself looks good to me. Can you help bring it through our internal code review?

drchen avatar Dec 12 '23 17:12 drchen