Loading an Android Resource into a WebView

后端 未结 2 542
借酒劲吻你
借酒劲吻你 2020-11-29 20:12

I have an Android app that displays a comic book. To make use of the built-in zoom controls, I am loading the pictures in a WebView like so:

webView.loadUrl(         


        
2条回答
  •  死守一世寂寞
    2020-11-29 21:08

    I also had to use loadDataWithBaseURL instead of just plain loadData to get the file:///android_res/drawable/page1.jpg to work.

提交回复
热议问题