Appcelerator Titanium 移动应用程序屏幕?
我正在尝试弄清楚如何使用 Appcelerator Titanium 制作多屏应用程序。我熟悉 Android 开发,因此使用 Android SDK 我会创建一些不同的活动,每个活动执行不同的工作(登录屏幕、显示项目列表的屏幕等)。Titanium 中的等效项是什么?我知道 app.js 是应用程序的主要部分,但我认为不建议将所有代码都放在该单个文件中。厨房水槽应用程序有很多文件和功能,但我不确定它们如何组合在一起。那么,在 Titanium 中为具有几个屏幕执行不同操作的基本应用程序创建项目的推荐方法是什么?我缺少屏幕的钛概念。
I am trying to figure out how to make a multi-screen app using Appcelerator Titanium. I am familiar with Android development, so using the Android SDK I would create a few different activities, each doing their different work (login screen, screen displaying list of items, etc.) What is the equivalent in Titanium? I know that app.js is the main part of the app, but I assume it is not recommended to just put all code in that single file. The kitchen sink app has a lot of files and functionality, but I am not sure how they all fit together. So, what is the recommended way to create a project in Titanium for a basic app with a few screens doing different things? I am missing the Titanium concept of a screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
不..
你可以像
我建议使用 MVC 模式就像我已经在这里发布的。
no..
you can do it like
i recommend to use the MVC-pattern like i already posted here.
App.js 文件基本上是初始化不同窗口屏幕的文件,并使用选项卡加载这些窗口屏幕。这里是创建简单屏幕的链接 创建窗口&选项卡
有关与 TitaniumUI 相关的更多属性
App.js file is basically the file to initialize different window screens, and use Tabs to load those windows screens.Here is a link to create simple screens Create Window & Tabs
For further properties related to TitaniumUI
尝试这样做:
app.js
window1.js
希望这会有所帮助;)
Try doing this:
app.js
window1.js
Hope this will help ;)
尝试使用下面的代码:
要在其他 JS 文件中打开主屏幕,请使用此代码。
try using my code below:
To open homescreen in other JS file, use this.
经过大量时间的研究,我找到了通过附加到按钮的单击事件打开不同窗口的解决方案。
employee.js
在employeeDetails.js中,
我在此页面找到了解决方案:http://www.mindfiresolutions.com/Open-New-Window-Without-URL-Property-In-Titanium-2214.php< /a>
After a lot of time research i i found the solution for opening different windows with a click event attached to a button.
employee.js
In employeeDetails.js
I found the solution in this page: http://www.mindfiresolutions.com/Open-New-Window-Without-URL-Property-In-Titanium-2214.php