I've been searching, but I can't find a code that works with mine, I've found some similar questions, but the others not work with my "after loading" code.
What I need is search for a text, if exist show the page normally (do nothing, I mean, let continue), if not exist, show a html message on the same webview with this code:
String MsgError = "<html><body><h1 style='color:#FF0000'>Error</h1><br /><a style='color:#000000'>An error occurred while page is loading, please try again later.</a></body></html>";
mWebView.loadData(MsgError, "text/html", "UTF-8");
I have to find a text like this one:
Text
This is my "after loading" code:
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
view.clearCache(true);
}
Thanks in advanced.