I am trying to install an image for WebView for my application.
I use the code below to set the image to my WebView ,
String imageUrl = " file:///android_res/drawable/dinner_menu.png"; WebView wv = (WebView) findViewById(R.id.yourwebview); wv.getSettings().setBuiltInZoomControls(true); wv.loadUrl(imageUrl);
This is great for Android 2.2 and higher .
But if I try to run the code in 2.1 or lower , it will show an error like,
The requested file was not found /android_res/drawable/dinner_menu.png .
Can anybody help me.
source share