7

We have and app that has a scroll view with items that can be paged (left + right).

We are finding that users keeps scrolling (up+down) when they try to swipe (left+right), particularly when the use the phone one-handed and using their thumb to swipe.

Through physical experimentation the up+down action appears to kick in earlier than we'd like i.e the cut off point appears to be

|dy| > |dx| => up-down action

|dy| < |dx| => left-right action

I'd like to know if it is possible to change the swipe action such that we only scroll up and down when say the the dy > 1.4*dx i.e. make the angle of attack significantly more in the vertical plane.

I hope the above makes sense.

I am thinking I may need to intercept the gestures and only pass through those that meet my more restrictive criteria to the underlying views.

Community
  • 1
  • 1
Shaun Wilde
  • 8,228
  • 4
  • 36
  • 56
  • 1
    I eventually used a tweak of the VerticalScrollView suggestion from http://stackoverflow.com/questions/2646028/android-horizontalscrollview-within-scrollview-touch-handling – Shaun Wilde Aug 22 '12 at 00:38
  • What tweak? I couldn't see where those methods allowed modifiying dx or dy. – whitneyland Apr 17 '15 at 16:46
  • tweak means I made a slight alteration to the code in the link – Shaun Wilde Apr 17 '15 at 22:33
  • Your question mentions adjusting the "sensitivity" of the scroll, which I don't see as possible hence my question of what tweak did you make. I assume your need was actually about constraining scrolling to get the interaction needed. – whitneyland Apr 18 '15 at 02:11
  • If I recall correctly (and it was 3 years ago) I used the MotionEvents to calc |dx| and |dy| and only up/down if |dy| > 1.4* |dx| - sorry no longer have the source code to hand to help further. – Shaun Wilde Apr 18 '15 at 02:34

0 Answers0