如何在Android中读取HTML文件 [英] How to read html file in android
本文介绍了如何在Android中读取HTML文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在data/data/com.file/sample.html中创建html文件.现在我想在Webview中显示html文件.请帮助我.
I create html file in data/data/com.file/sample.html.Now i want to show the html file in Webview.Please help me.
推荐答案
应该是将文件加载到webview中的简单情况
Should be a simple case of loading the file into the webview
WebView webv = (WebView)this.findViewById(R.id.WebView);
webv.loadUrl("file:///data/data/com.file/sample.html");
希望这能为您指明正确的道路.
/Darren
Hope this points you down the correct path.
/Darren
这篇关于如何在Android中读取HTML文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文