public class WebViewPreLoad extends WebView{
public WebViewPreLoad(Context context) {
super(context);
}
public void loadUrl(String str){
if(str.contains("something"))
super.loadUrl(str);
else
hide this
}
}
of course you will need to find the correct "if" for ur case
do the same with
public void loadUrl(String url, Map<String,String> extraHeaders)
change the super statement to:
super.loadUrl(url, extraHeaders);
source
share