亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

WebView 發布新的更新安卓操作系統

WebView 發布新的更新安卓操作系統

LEATH 2022-06-04 15:11:08
最近一些設備停止工作 webview 組件,我檢測到 android 8 和 android 6 或更少的工作正常,但在 android 7 o 9 的設備中沒有文本顯示。這個問題在最近幾周開始出現。自 2018 年 2 月以來,我沒有更新應用程序descripcion = (WebView) findViewById(R.id.txt_descripcion);String description="<html><body><head><style type=\"text/css\">\n" +            "p {\n" +            "font-size:90%;text-indent: 1em; text-align:justify; \n" +            "}\n" +"body {font-family: Arial, Helvetica, sans-serif;}\n" +            "\n" +            "table {     font-family: \"Lucida Sans Unicode\", \"Lucida Grande\", Sans-Serif;\n" +            "    font-size: 12px;     width: 100%; text-align: left;    border-collapse: collapse; }\n" +            "\n" +            "th {     font-size: 13px;     font-weight: normal;          background: #b9c9fe;\n" +            "    border-top: 4px solid #aabcfe;    border-bottom: 1px solid #fff; color: #039; }\n" +            "\n" +            "td {         background: #e8edff;     border-bottom: 1px solid #fff;\n" +            "    color: #669;    border-top: 1px solid transparent; }\n" +            "\n" +            "tr:hover td { background: #d0dafd; color: #339; }"+            "</style></head><p>"+hechizo.getDescripcion()+"</p></body></html>";descripcion.loadData(description,"text/html; charset=UTF-8",null);
查看完整描述

1 回答

?
翻過高山走不出你

TA貢獻1875條經驗 獲得超3個贊

嘗試這個:


WebSettings settings = myWebView.getSettings();

settings.setDefaultTextEncodingName("utf-8");

myWebView.loadDataWithBaseURL(null, htmlString, "text/html", "utf-8", null);


查看完整回答
反對 回復 2022-06-04
  • 1 回答
  • 0 關注
  • 112 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號