Azoft / CarouselLayoutManager

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

Scroll Direction Hint #37

Open micbakos opened 7 years ago

micbakos commented 7 years ago

Hello,

Thank you for your amazing library. I am trying to find out the direction of scrolling while the center item changes. The problem exists when the adapter has only two items and the layout manager is circular. For example the first item displays the minute 0 and the second item displays the minute 30. The item in the center is the 30 one. When I scroll up the item changes correctly to 0 but I have no indication that the scroll happened forwards. The same thing happens when I scroll down and the item goes from 0 to 30 (backwards). The scrollBy(...) function gets a diff that may be bigger or lower than 0 in any given situation thus I am not able to distinct that the scroll happened backwards or forwards.

Any given thoughts?

mig35 commented 7 years ago

Hi @bakoproductions. I know that there can be a problem with two elements.. But now I don't have free time to look into this issue. I'll try to find some time soon, but I'm not sure when. Best wishes, Mike.

micbakos commented 7 years ago

Thank you for your response @mig35.