Open kiranboghra opened 8 years ago
Check my other repository. Deprecated one. CoverFlow there has this implemented. Dne 5. 3. 2016 10:55 dopoledne napsal uživatel "kiran boghra" < notifications@github.com>:
When user stop scrolling and MotionEvent.ACTION_UP is called in Carousel selected item should move to center point (Scroll snap point), is there any way or suggestionfor this functionality?
— Reply to this email directly or view it on GitHub https://github.com/applm/CarouselWidget/issues/11.
please provide link.
@kiranboghra If you still need help with this I am implemented in my forked release.
@gintechsystems in your repository did u managed how to make scroll to position to work? I tried it but I was unable to make it work properly.
One issue I have when I just uncomment the function "carousel.scrollToItemPosition(position);" in onClickListener is that some views do a visual flickering.
The other issue it's a little more complex to explain. But my idea is to scroll to a card that it's not displayed in the screen. For instance if I turn off the loop, and set mCount to length * 5; I will have 25 cards. So if I set the card's onLongClickListener method to call scrollToPosition for the hardcoded value 24 (the last card), independently in which card I click in theory I should always jump to the last card. But what happens is that sometimes I jump to the last card -> 24, other times to 23. When I make the jump from the first card -> 0 the app just crashes.
Do you have any idea how to solve this?
@ashenriques Take this to my repo please, I have gotten that to work using setSelection, I believe.
@gintechsystems you have your issues section disabled in your repo (try this -> http://programmers.stackexchange.com/questions/179468/forking-a-repo-on-github-but-allowing-new-issues-on-the-fork. The method setSelection centers the clicked card, but does not animate the scroll to it.
When user stop scrolling and MotionEvent.ACTION_UP is called in Carousel selected item should move to center point (Scroll snap point), is there any way or suggestionfor this functionality?