mWebView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
Disables all touch events on a WebView
because the touch listener is executed before the default touch behavior of the WebView
. By returning true
the event is consumed and isn't propagated to the WebView
.
Using android:clickable="false"
does not disable touch events.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…