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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -