How can I reference a file in my drawable folder to put in WebView in android?
For example, I want to make开发者_开发问答 an image appear in webview to utilize the zoom functions. I would use this line of code:
this.myWebView.loadUrl("file://");
I just need to know what to put after file to reference the image.
you would have to use the data uri and base64 encode the image bytes. the Uri would look something like this:
this.myWebView.loadUrl("data:image/png;base64,<base64DataHere>");
精彩评论