Search Results

Search found 1 results on 1 pages for 'mikenereson'.

Page 1/1 | 1 

  • @Android display /res/viewable in WebView

    - by MikeNereson
    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 and code such as this: final WebView browser = (WebView) findViewById(R.id.my_webview); String html = new MyHelper(myObject).getHtml(); browser.loadDataWithBaseURL("", html, "text/html", "UTF-8", ""); Where the String html has something like: <html><head> <h1>Here is the image</h1> <img src="my_image.png" /> </head><html> The question is, what should that image src attribute be to refer to the image in /res/drawable ~Thanks

    Read the article

1