Referencing image in assets from HTML not working

后端 未结 2 1189
一生所求
一生所求 2021-01-14 01:17

I\'m trying to display an image in a WebView in an Android app. The image exists in the assets folder of my Android project. The HTML is programmatically built and has this

2条回答
  •  北海茫月
    2021-01-14 02:06

    enter image description here

     webView.loadDataWithBaseURL("file:///android_asset/", sourse, "text/html", "UTF-8", null);
    

提交回复
热议问题