我試圖改變的WebView的文字顏色與此代碼的WebView的集文本顏色android的
String message ="<font color='white'>"+"<u>"+
"text in white"+ "<br>" +
"<font color='cyan'>"+"<font size='2'>"+
" text in blue color "+"</font>";
webview.loadData(message, "text/html", "utf8");
但如何有一些HTML頁面。店我的SD卡我又如何能更改文本顏色..
我使用
webViewRead.loadUrl(url);
網址是我的文件的路徑。
請參閱本http://stackoverflow.com/questions/3624171/how顯示html的內容到webview使用安卓 –
但我想顯示的HTML頁面不text.wv.loadDataWithBaseURL(「」,HTML,MIME類型,編碼,「」); 在這個方法中,我應該把我的路徑(文件)PLZ dis-crib。 – Youddh
如果你想加載HTML文件,然後把HTML文件放入資產文件夾。請參考這個鏈接 http://stackoverflow.com/a/10844221/1263679 –