I already tried the following but without success.
My project is using API level 4.
Here is my code:
webView.loadUrl("android.resource://com.package.name.from.manifest/" + R.drawable.pic);
And I’ve got the following error in the WebView widget:
Web page not available
The Web page at
android.resource://com.package.name.from.manifest/2130837504 might be
temporarily down or it may have moved permanently to a new web
address.
Am I missing something? Should I create html page which will include a link to the resource as < img …> tag?
In the end I have done the following:
I had an array of file name extensions of each of the image in resources.
And then I could call the following method with the resource ID and it’s file name extension.