Override style of webpage in webview - android -
i trying override existing style webpage in webview. following webviewclient has not effect on webpage.
public class webclient extends webviewclient { @override public boolean shouldoverrideurlloading(webview view, string url) { return super.shouldoverrideurlloading(view, url); } @override public void onpagefinished(webview view, string url) { view.loadurl("javascript:document.getelementsbyclassname('main-container').style.paddingtop = '10px';"); } }
i used below jquery command apply style.
@override public void onpagefinished(webview view, string url) { view.loadurl("javascript: $('.main-container').css('padding-top','40px')"); }
Comments
Post a Comment