Detect touch / swipe / gesture with swiping from outside the screen

Viewed 209

I want to make something like default notification status bar (expandable from top of screen). How can I detect touch when user touch phone outside the screen and will move finger lower? OnTouch listener work only user start on screen.

1 Answers

In html-js, I use a maximum proximity threshold value, say 1% of the height, for the first hit of a touch event near the top of the screen, and another minimum threshold, say 10%, for the last touch event of the sequence, to confirm the user trying to swipe from outside the screen. Maybe, the same algorithm should do the job, in the case no event "swipe-from-outside" exist natively.

This suggestion does not implement the animated panel being dragged by the finger.

Related