I am using drawables in src for tag in webview would this work?
Absolutely not. HTML expects URLs for images. Not to mention that you are specifying a widget ID, not a drawable resource.
sir that really helped but it is working correctly on emulator but not on the device .Do you know how to solve it?
Perhaps your device is older -- one answer on the question that Mr. Clayson linked to suggests that file:///android_res/
URLs only work on Android 2.2 and higher.
However, the android.resource
scheme has been around longer:
android.resource://[package]/[res type]/[res name]
e.g.:
android.resource://this.is.my.package/drawable/button
I have not tried this in WebView
, but it is worth a shot.