-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feature: Fling functionality #2
Comments
I'm afraid that I can't reproduce the issue. Maybe I miss the point. During my test, the page didn't fall over automatically as long as my finger didn't leave the screen. |
No, what i meant is, the ability to "fling" it. (Flinging being that a animation continues at a degrading speed (or the same) after the finger is released. or something like that..) This is the experience in the Flipboard implementation: What i'm experiencing with your implementation is, if i release my finger before the page reaches the middle, it will always fall back. I need to keep my finger attached until it over the middle. In other words i need to take it over the middle with my finger and i can not fling it over the middle. I don;t know if you have Flipboard available to have a look but you'll notice that you can give pages a very small push and that will still trigger the page to flip over by itself. Is this not how you experience it? |
Now I got it. A velocity tracker is required to detect it. We'll add the support later with the event listener too. Thanks |
cool |
@openaphid The Flipboard component actually "snaps" to the direction that the finger last moved. Velocity does not matter, and doesn't need to be tracked. E.g. If the last touch movement was negative (bottom to top), always flip to the next page, regardless of how the gesture started, or how fast the finger was moving. I'd love to see this added, as it allows the user to "fling" through pages in an intuitive way. I am looking into the source now, to attempt to implement it myself. It appears that the key is to alter Awesome work! |
So making the change I describe above is very simple. In In remove then in add The only issue this causes is that the first page is no longer bound to the |
So the only other change I had to make to support the
where @openaphid Let me know if there is an issue with this implementation. I have submitted a pull request: #10. |
@iPaulPro Thanks in advance, I just use your code to fling and it works perfectly. But I seen slightly slower while backward page, sometimes it does NOT perform flip animation. Please tell me how to make it smoother like forward page? |
@iPaulPro Thanks for your contribution. @VAdaihiep A new issue is created to address the problem you have. |
@VAdaihiep Please try the updated APK to see if it fixes the issue: https://github.com/openaphid/android-flip/blob/develop/FlipView/Demo/APK/Aphid-FlipView-Demo.apk And you could follow it up in issue #17 |
Hi,
Thank you for sharing this code. I think it's very well done.
This is more of a feature request than an issue:
I would be nice if users could fling the pages. At this time its only possible to move the page over the middle and when over the middle, it falls over. But i thing it's a better user experience to be able to fling it. When you use Flipboard, you can flip through the pages very smoothly by doing very short flings.
Thanks!
The text was updated successfully, but these errors were encountered: