I'm making a webview app and I want to hide parts of the website like the header and footer I tried to do that by this code
public void onPageFinished(WebView view, String url) {
view.loadUrl("javascript:(function() { " +
"document.getElementsByClassName('header')[0].style.display='none'; })()");
}
but it only hides it when the page is finished from loading and leave its area blank and don't remove its space
Is there away to hide the class entirely ? If there any tutorials do you recommend in order to do that ?
Aucun commentaire:
Enregistrer un commentaire