alexvasilkov / GestureViews

ImageView and FrameLayout with gestures control and position animation
Apache License 2.0
2.37k stars 384 forks source link

getController().enableScrollInViewPager support ViewPager2 #182

Closed FireboltX closed 1 year ago

FireboltX commented 1 year ago

Dear alexvasilkov: Do you have any plans to enable "getController().enableScrollInViewPager" to support ViewPager2? I've tried copy another GestureControllerForPager , and replace ViewPager to ViewPager2 ,but i had failed. When i executed "getController().enableScrollInViewPager" in viewpager's adapter ,the image cannot slide any more.

alexvasilkov commented 1 year ago

The old way to enable seamless scrolling with ViewPager was more like a hack. A better approach would be to use NestedScrollingChild / NestedScrollingParent mechanizm, but it's a rather complicated stuff that I didn't have time to implement yet.

Meanwhile I'll close this issue as a duplicate of #176, you can add your comments there.