I am using Webview in android where i load a webpage but, I want all the links to be disabled and web view should be scrollable.
I am using the following code right now:
tnc.setOnTouchListener(new View.OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
This makes web view disabled but scrolling also goes away.
I have also tried :
tnc.setClickable(false);
but this also doe not work. Please help me out.
If you want to override the clicking of links in the WebView
, you can use the shouldOverrideUrlLoading
method of the WebViewClient
.
webView.setWebViewClient(new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url) {
return true;
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With