在页面上显示HTML数据:电晕SDK [英] Display HTML data on a page : corona SDK

查看:106
本文介绍了在页面上显示HTML数据:电晕SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的电晕应用程序之一,我有一个场景显示一个HTML表格。是否有可能电晕SDK应用程序的正常网页上显示一个HTML表格(其HTML数据串内的应用程序生成的)..?

In one of my apps in corona, I have to display a html table in a scene. Is it possible to display a html table(whose html data string is generated within the app) on a normal page of corona sdk app..?

任何意见是AP preciable ...

Any advice is appreciable...

推荐答案

我想我明白你的要求,如果是这样,那么是的,你当然可以!

I think I understand what you are asking, and if so, then yes, of course you can!

您需要做的是使用API​​进行的WebView。
http://docs.coronalabs.com/api/library/native/newWebView.html

What you need to do is use the API for WebView. http://docs.coronalabs.com/api/library/native/newWebView.html

注:此无法通过模拟器进行测试,你将不得不将其装载到一个设备,因为这是一个本地元素

您可以加载使用此API本地或远程的HTML文件。

You can load local or remote html files using this API.

local webView = native.newWebView( 0, 0, 320, 480 )
webView:request( "http://www.coronalabs.com/" )
-- or
webView:request( "localfile.html", system.ResourceDirectory )

我在一个医疗程序,我正在开发,在那里我会直接从我的应用程序链接的客户医疗产品这个工作了好几次,然后当他们完成浏览,他们能收出的WebView并继续使用应用程序是正常的。

I have done this quite a few times in a medical app I was developing, where I would link customers to medical products directly from my app, and then when they were finished browsing, they could close out the webview and continue using the app as normal.

如果你希望类似的功能这一点,所有你需要做的是建立你的web视图,并创建具有某种后退按钮,用户可以preSS的叠加杀网页视图,这应该是从相当解释性该API。

If you desire similar functionality to this, all you need to do is set up your webview, and create a overlay with some kind of back button the user can press to kill the webview, which should be fairly explanatory from the API.

这篇关于在页面上显示HTML数据:电晕SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆