@Android display /res/viewable in WebView

前端 未结 7 1416
耶瑟儿~
耶瑟儿~ 2020-11-29 05:51

I am throwing HTML to a webview to render. In the HTML I need to load an image that I have in /res/drawable.

I have /res/drawable/my_image.png

相关标签:
7条回答
  • 2020-11-29 06:52

    This worked in android 2.2

    <img src = "file:///android_res/drawable/q1.png" />
    

    where q1.png is in the res/drawable-hdpi folder

    0 讨论(0)
提交回复
热议问题