Azoft / CarouselLayoutManager

Android Carousel LayoutManager for RecyclerView
Apache License 2.0
2.56k stars 367 forks source link

How to disable smoothScrollToPosition #116

Closed isarYMB closed 3 years ago

isarYMB commented 3 years ago

I want to disable smoothScrollToPosition for sliding next picture. i just want to using scrollToPosition, so that the sliding not using animation. Or i want to sensitive scroll (0 distance scroll), if I scroll, it goes directly to the next image (always center)

mig35 commented 3 years ago

hey @isarYMB you can try to change CenterScrollListener implementation and make it whatever you want.

isarYMB commented 3 years ago

yes, im using CenterScrollListener , but the sliding have distance scroll. i want to using this carousel for 3D degree image for product in E-commerce. i want if i scrolling, the carousel not have distance if i scrolling. How to disable distance scroll?

mig35 commented 3 years ago

sorry, but I don't get your idea. are you able to share an animation? but anyway this library is distributed as is and no changes are planed.

isarYMB commented 3 years ago

i mean, i want to carousel for 360 degree image. example video like this https://www.youtube.com/watch?v=YsNO7LKqJcs . it is a collection of images that are in one carousel

mig35 commented 3 years ago

You should find 360 degree library somewhere. This library has only carousel layout for RecyclerView. Also you may have some problems with touch events as I can see now

isarYMB commented 3 years ago

i cant find 360 degree library from everywhere. so, i just can using your library. i just have 1 problem. this carousel have distance scroll for go to next picture. i want 0 distance. so that the image remains in the center and the image does not shift slightly in the other direction to go to the next image

mig35 commented 3 years ago

You can checkout the code and adjust it for your needs 👍 Also if you are able to make it configurable and create PR that would be awesome!

You should remove CenterScrollListener and CarouselZoomPostLayoutListener and then change some code in https://github.com/Azoft/CarouselLayoutManager/blob/master/CarouselLayoutManager/carousellayoutmanager/src/main/java/com/mig35/carousellayoutmanager/CarouselLayoutManager.java#L343

isarYMB commented 3 years ago

Good. finally i can solve the problem. your library is very very awesome. thankyou