HTML5转换成独立的Android应用程序 [英] Convert HTML5 into standalone Android App
问题描述
我有一个动态HTML5 文件不包含任何外部资源(例如图像,CSS和脚本文件里面的codeD)。这HTML5应用程序工作正常使用的互联网浏览器。我在想,如果有可能为转换这个 HTML5应用到独立的Android应用程序,所以它可以直接不用浏览器中执行。请指教。
I have a dynamic HTML5 document that does not contain any external resources (no images, css and scripts are coded inside of document). This HTML5 application is working fine with internet browser. I was wondering, if it would be possible to convert this HTML5 application into standalone Android application, so it can be executed directly without browser. Please advise.
推荐答案
使用Eclipse创建一个Android应用程序。
Create an Android app using Eclipse.
创建一个布局,有一个<的WebView>
控制
Create a layout that has a <WebView>
control.
将你的HTML code到 /资产
文件夹。
Move your HTML code to /assets
folder.
加载的WebView与您的文件:/// android_asset /文件
Load webview with your file:///android_asset/ file.
和你有一个Android应用程序!
And you have an android app!
这篇关于HTML5转换成独立的Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!