Bugfix/#86 cancel fling with touch #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solution
Any ongoing fling is now immediately interrupted if a ACTION_DOWN touch event is detected. If the user holds down his finger he is able to start a new scroll or fling. This is - at least for me - the behavior I expect from a f.ex. image viewer.
Since this only affects the
ScrollFlingDetector
it should not affect other ongoing animations.This PR also adds a long click action (white tile) to the
ColorGridView
, which I needed for testing and thought it would be a useful addition, so I left it in.It has been quite a while since I have opened #86 and sadly I am not aware anymore what the current state of the ticket is. As far as I can tell it is still not possible to interrupt ongoing animations using touch input. They can, however, be be interrupted by the developer when issuing a new
moveTo
orpanTo
or any similar methods, for bothanimate=true
as well asanimate=false
.The option to interrupt ongoing animations by touch is not part of this PR (except the fling of course).