You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the swipe gesture to turn pages and it work great by adding a GestureDetector into the webview OnTouchListener.
But if I want to check if the webview consumed the event before trying to detect the swipe gesture (in order to avoid turning the page when dragging a slideshow for example) it do not work because the webview.onTouchEvent(e) always return true even if there is no interactive content.
GestureDetectorgestureDetector = newSwipeGestureDetector(context);
webview.setOnTouchListener(newView.OnTouchListener() {
publicbooleanonTouch(Viewv, MotionEventevent) {
// With the following code, the gestureDetector is never triggered, webview.onTouchEvent(e) always return true (event is consumed by the webview).returnwebview.onTouchEvent(event) || gestureDetector.onTouchEvent(event);
}
});
This is probably an Android webview issue.
The text was updated successfully, but these errors were encountered:
Hello,
I'm using the swipe gesture to turn pages and it work great by adding a GestureDetector into the webview OnTouchListener.
But if I want to check if the webview consumed the event before trying to detect the swipe gesture (in order to avoid turning the page when dragging a slideshow for example) it do not work because the webview.onTouchEvent(e) always return true even if there is no interactive content.
The same thing works perfectly on iOS.
Here is a StackOverflow question referring to the same problem : http://stackoverflow.com/questions/29821565/check-if-android-webview-is-consuming-touch-events
This is probably an Android webview issue.
The text was updated successfully, but these errors were encountered: