android webview 图表,Android WebView 无法正常显示网页图表
1、Android項目中,使用了一個WebView,加載的頁面是一個使用百度echart和canvas寫的統計圖表,現在網頁版和IOS版都能正常顯示,Android無法正常顯示:
2、ios和web端:
3、android 端:
4、Android控制臺錯誤信息:
03-31 10:14:34.549 E/webview: registerForStylusPenEvent onAttachedToWindow
03-31 10:14:34.549 E/webview: registerForStylusPenEvent START
03-31 10:14:34.549 E/webview: registerForStylusPenEvent END
.
.
.
E/Web Console: Uncaught TypeError: Object # has no method 'setLineDash':125
6、已google過,一年多的google經驗,沒找到答案以及Android 相關的內容,無奈,,只好求助sf的各路好友了,,謝謝啦
補充:
使用5.1系統測試正常,4.4顯示不正常:(以下是5.1系統顯示情況)
代碼:
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webView.loadUrl("http://ast.buoyantec.com/rooms/pue?user=" + phone + "&room=" + room_id);
webView.setWebChromeClient(new WebChromeClient() {
@Override
public void onProgressChanged(WebView view, int newProgress) {
// TODO Auto-generated method stub
if (newProgress == 100) {
// 網頁加載完成
progressBar.setVisibility(View.GONE);
} else {
// 加載中
if (View.GONE == progressBar.getVisibility()) {
progressBar.setVisibility(View.VISIBLE);
}
progressBar.setProgress(newProgress);
}
super.onProgressChanged(view, newProgress);
}
});
總結
以上是生活随笔為你收集整理的android webview 图表,Android WebView 无法正常显示网页图表的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 韩顺平--Java坦克大战
- 下一篇: 华为手机如何调时间显示_华为手机照片如何