You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, awesome awesome library. Thank you for it.
Secondly, I am trying play a small sound each time an item goes through the center position. I've tried implementing my own CarouselLayoutManager.PostLayoutListener but it does not work as extended because this fires only when an item remains stationary. The problem is when doing a smoothScrollToPostion or when the user flings the recyclerview and a lot of scroll happens on the screen.
So what event should I be looking for in order to be notified each time an item goes through the center position, independent if it's programatically or scrolled by the user?
Thank you again for this awesome work.
The text was updated successfully, but these errors were encountered:
alinberce
changed the title
Play sound when item goes through the center position
Play sound when item goes through the center position [Question]
Jul 16, 2018
We have OnCenterItemSelectionListener for this situation with addOnItemSelectionListener method. This listener will be fired on every new center item change event. But this listener will be fired when it is a visual change. So imagine that user is scrolling really slow. And the center item now is 0. And when 1 item will be upper then 0 - this event will be fired. So it may take some time while user will move this new 1 item to the center...
So basically I don't have what you need - there is no event when item is going through the center position. May be I will add this event as a part of androidx update.
Hi,
First of all, awesome awesome library. Thank you for it.
Secondly, I am trying play a small sound each time an item goes through the center position. I've tried implementing my own
CarouselLayoutManager.PostLayoutListener
but it does not work as extended because this fires only when an item remains stationary. The problem is when doing asmoothScrollToPostion
or when the user flings the recyclerview and a lot of scroll happens on the screen.So what event should I be looking for in order to be notified each time an item goes through the center position, independent if it's programatically or scrolled by the user?
Thank you again for this awesome work.
The text was updated successfully, but these errors were encountered: