开发者

android webview use <img> load a image from sdcard

开发者 https://www.devze.com 2023-01-28 02:21 出处:网络
i\'m trying us开发者_Go百科e webview to load a image from sdcard i use this path : file///sdcard/1.png

i'm trying us开发者_Go百科e webview to load a image from sdcard

i use this path :

file///sdcard/1.png

but i didn't see the picture.

is anything wrong?


One solution is to put your HTML and image file in the asset folder, and load the HTML file from there. Another solution is to use the method loadDataWithBaseURL() of WebView.

0

精彩评论

暂无评论...
验证码 换一张
取 消