Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private class CustomWebClient extends WebViewClient {
- @Override
- public void onPageFinished(WebView view, String url) {
- progress.setVisibility(View.GONE);
- super.onPageFinished(view, url);
- }
- @Override
- public void onPageStarted(WebView view, String url, Bitmap favicon) {
- super.onPageStarted(view, url, favicon);
- }
- @Override
- public boolean shouldOverrideUrlLoading(WebView view, String url) {
- doGet(url);
- return true; // super.shouldOverrideUrlLoading(view, url);
- }
- public void onLoadResource(WebView view, String url) {
- webview.loadUrl("javascript:(function() { "
- + "document.getElementsByTagName('header')[0].style.display = 'none'; "
- + "})()");
- webview.loadUrl("javascript:(function() { "
- + "document.getElementsByTagName('footer')[0].style.display = 'none'; "
- + "})()");
- webview.loadUrl("javascript:(function() { "
- + "document.getElementsByTagName('section').search_again.style.display = 'none'; "
- + "})()");
- }
- }
Add Comment
Please, Sign In to add comment