Using webView's loadDataWithBaseURL not loading images from sdcard

前端 未结 2 929
终归单人心
终归单人心 2021-01-23 21:26

I would like to set some html content in my webview with some pictures. I\'ve read on the internet i must use loadDataWithBaseUrl to do such a thing because i need to link the f

2条回答
  •  青春惊慌失措
    2021-01-23 22:33

    You don't need to put full path of your image into html.

    img src="images/test1.jpg"

    Instead

    img src=\""+ imagePath + "\"

提交回复
热议问题