say you get the url sent as a string "www.google.com", from the edittext just do a check if this is a blocked url. for example
if( "www.google.com".equalsIgnoreCase(blocked_string)) { webview.setVisibility(View.GONE); warning_view.setVisibilty(View.VISIBLE); } or you could try overriding the shouldOverrideUrlLoading() in the WebViewClient class
@Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if(my_url.equals("www.google.com")){ //do something. } return true; } Creating and setting a WebViewClient subclass. It will be called when things happen that impact the rendering of the content, eg, errors or form submissions. You can also intercept URL loading here (via shouldOverrideUrlLoading()).