android - javascript interface in not working in below 5.0 -
- i have used below code avoid white space when webview expands working in 5.0
i have added suppresslint @suppresslint({ "setjavascriptenabled", "javascriptinterface" }) avoid error
but still white space remains in android 4.2,4.3 devices
can suggest me solve issue.
web_content_url.setwebviewclient(new webviewclient() { public boolean shouldoverrideurlloading(webview view, string url) { log.i(tag, "processing webview url click..."); pbar2.setvisibility(view.visible); view.loadurl(s[1]); return true; } public void onpagefinished(webview view, string url) { log.i(tag, "finished loading url: " + url); pbar2.setvisibility(view.gone); view.loadurl("javascript:myapp.resize(document.body.getboundingclientrect().height)"); super.onpagefinished(view, url); } public void onreceivederror(webview view, int errorcode, string description, string failingurl) { log.e(tag, "error: " + description); pbar2.setvisibility(view.visible); } }); web_content_url.addjavascriptinterface(this, "myapp");
Comments
Post a Comment