I want to block a link from loading within a Webview.
Code
public class WebMy extends Activity {
private WebView mWebview;
this will cause nothing to happen when the link "http://www.myweb.com/pepito" is clicked
public class MyWebViewClient extends WebViewClient {
public boolean shuldOverrideKeyEvent (WebView view, KeyEvent event) {
// Do something with the event here
return true;
}
public boolean shouldOverrideUrlLoading (WebView view, String url) {
return url.equals("http://www.myweb.com/pepito");
}
}