how set text color of webview in android

后端 未结 4 790
情歌与酒
情歌与酒 2021-01-13 06:57

i am trying to change text color of webview with this code

String message =\"\"+\"\"+
\"text in white\"+ \"
\"
4条回答
  •  别那么骄傲
    2021-01-13 07:31

    put your file path as

    String htmlPath = "file:///mnt/sdcard/test/11.html"; 
    String baseUrl = "file:///mnt/sdcard/test/"; 
    webView.loadDataWithBaseURL(baseUrl, message, "text/html", "utf-8", null); 
    webView.loadUrl(htmlPath); 
    

提交回复
热议问题