Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 从SQLite数据库加载html,从资产加载图像?_Android_Sqlite_Webview_Android Assets - Fatal编程技术网

Android 从SQLite数据库加载html,从资产加载图像?

Android 从SQLite数据库加载html,从资产加载图像?,android,sqlite,webview,android-assets,Android,Sqlite,Webview,Android Assets,我正在开发一个android应用程序,我需要专家的帮助,我的场景如下 我将html(文本)存储在SQlite数据库中,在html中我有一些图像,我可以从assets文件夹加载这些图像 我从数据库加载html,html中的图像(src)应该指向资产文件夹 请添加您的建议和评论 谢谢, Ashok只需使用file:///android_asset/your_image.pnguri架构。例如 <img src="file:///android_asset/image_name.png" /&g

我正在开发一个android应用程序,我需要专家的帮助,我的场景如下

我将html(文本)存储在SQlite数据库中,在html中我有一些图像,我可以从assets文件夹加载这些图像

我从数据库加载html,html中的图像(src)应该指向资产文件夹

请添加您的建议和评论

谢谢,
Ashok

只需使用
file:///android_asset/your_image.png
uri架构。例如

<img src="file:///android_asset/image_name.png" />

请补充更多信息:到目前为止你做了什么,真正的问题是什么?
webView1.loadDataWithBaseURL("file:///android_asset/", html, "text/html", "utf-8", null);