Media preview: swipe gesture detection should behave more liberally
I have:
- [x] searched open and closed issues for duplicates
- [x] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports
Bug description
When holding the phone in one hand you will most often end up using that hand's thumb to swipe left and right. Naturally, this results in a gesture slightly diagonal (e.g. from bottom left to top right and vice versa for the right hand) rather than exactly horizontal. The gesture detection fails in this case, since it seems to expect a nearly horizontal move, which is nearly impossible to accomplish in one-hand-usage. Hence, the gesture detection should be more "liberal", if the move direction isn't absolutely accurate. Besides of that, a full screen mode (that can be toggled) would fit in fairly nice.
Steps to reproduce
- open media preview gallery
- hold phone in one hand and try to use that hand's thumb to swipe left/right
Actual result: Gesture detection most often fails to recognize, user gets frustrated Expected result: Gesture detection succeeds to recognize and shows previous/next media
Device info
Device: Lenovo Moto G 4 Plus (other devices as well) Android version: 7.0 (Android 4.4 as well) Signal version: 4.15.0
Link to debug log
https://gist.github.com/4ad7a55db59d9c7c09d8d93b7287e481
We're using a standard Android ViewPager, we have no control over the gesture detection that I know of, that's an Android thing.
Hmmm, I see. What about writing a custom OnTouchListener for the ViewPager? (see https://stackoverflow.com/a/27346452 for example). Maybe this would also address #7332...