问题
I am loading a local HTML
document kept in assets
folder into a WebView
. It is showing fine in 2.3 devices but, showing blank screen in ICS + devices.
回答1:
Try using this code
webView.getSettings().setPluginsEnabled(true);
webView.getSettings().setAllowFileAccess(true);
As per my knowledge flash url do not work in ICS.
回答2:
This code should work
webView.getSettings().setPluginsEnabled(true);
webView.getSettings().setAllowFileAccess(true);
webView.loadUrl(url);
weevils.setJavascriptEnabled(true);
Also check that the internet permission in declared in your manifest.xml And take a look at this thread which is quite similar: Android Webview not rendering correctly on ICS 4.0 +
回答3:
try adding this code if the above answer does not solve the problem
webView.getSettings().setBuiltInZoomControls(false);
I an not too sure on this though.
来源:https://stackoverflow.com/questions/13155800/webview-showing-blank-in-ics