Android disable WebView touch but keep zooming/scrolling

后端 未结 4 759
误落风尘
误落风尘 2021-01-23 16:59

I am looking for a method to disable touch on a WebView so user\'s are not able to click on html links but keep the zooming and scrolling functions of the WebView.

4条回答
  •  粉色の甜心
    2021-01-23 18:00

    Webview.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {      
                        return false;
            }
    });
    

提交回复
热议问题