在android webview中禁用长按

Jit*_*thu 6 android long-click android-webview onlongclicklistener

我正在使用css列在android webview中显示内容.我用了longclicklistner {return true}; 有了这个我能够在手机中禁用longclick但它似乎不适用于标签(例如galaxy tab 2).我也使用jquery阻止touchmove事件,但是当滑动作为longclick的一部分发生时,css列正在移动.欢迎任何帮助.谢谢.

wbView.setOnLongClickListener(new View.OnLongClickListener() {

        @Override
        public boolean onLongClick(View v) {
            return true;
        }
    });
    wbView.setLongClickable(false);
Run Code Online (Sandbox Code Playgroud)

jquery代码:

document.getElementById("divIdToShowContent").ontouchmove = function(e){
         e.preventDefault();
         var touching = null;
Run Code Online (Sandbox Code Playgroud)

}

Jit*_*thu 0

我避免使用 GestureDetector 和 SimpleOnGestureListener,我通过捕获 MotionEvent.ACTION_DOWN 和 MotionEvent.ACTION_UP 的位置来捕获触摸列表来完成此操作