是否可以在web视图使用可绘制(而不是图像)?

问题描述:

可能重复:
   @android显示/ RES /可视的web视图

是否有可能使用可绘(形状,渐变等)的WebView(里面 IMG 标记)?

Is it possible to use drawables (shape, gradient, etc.) in WebView (inside img tag)?

P.S。我读过这个答案。所以,我知道如何插入图像,但对于其他的可绘制?

P.S. I've read this answer. So, I know how to insert image, but what about other drawables?

修改

例如:我需要显示圆的WebView(不使用画布)

For example: I need to display circle in WebView (without using canvas).

您可以插入的Base64-CN codeD映像的URL中的&lt直接数据; IMG ...>标签。该URL格式为数据: MIMETYPE 的;的base64,数据的。例如参见这里

You can insert Base64-encoded image data directly in the URL for the <IMG...> tag. The URL format is "data:mimetype;base64,data". For example see here.