0

I need to display a vector drawable which is present in drawable folder in a WebView. This is for a native android app.

If I use the code:

 <img src="file:///android_res/drawable/example.png"/> 

It works for png/jpeg images, but is there any way to display vector drawable (with .xml extension) inside a WebView?

Any help would be appreciated. Thanks in advance

Jon Goodwin
  • 9,053
  • 5
  • 35
  • 54
Abhishek V
  • 12,488
  • 6
  • 51
  • 63
  • https://stackoverflow.com/questions/33537751/android-how-to-load-a-vector-drawable-image-into-a-webview – AskNilesh May 22 '18 at 08:56
  • first **[get bitmap from vector](https://stackoverflow.com/questions/33696488/getting-bitmap-from-vector-drawable)** Than **[display that bitmap in webview](https://stackoverflow.com/questions/10849200/android-how-to-display-a-bitmap-in-a-webview)** – AskNilesh May 22 '18 at 08:59

0 Answers0