如何在 Spark 列表控件中导航?
我正在使用 Spark 列表控件构建一个移动应用程序。当用户点击列表项时,我希望它导航到该通信
<s:List id="list" width="100%" height="100%" labelField=" label">
<s:dataProvider>
<s:ArrayList>
<fx:Object label="Page One" />
<fx:Object label="Page Two" />
<fx:Object label="Page Three" />
<fx:Object label="Page Four" />
</s:ArrayList>
</s:dataProvider>
</s:List>
页面
我如何编码,以便当用户点击项目标签=“第一页”时,它将导航到 PageOneView.mxml,如果点击“第二页”,它将转到 PageTwoView.mxml 等等。 谢谢
I'm building a mobile app, using spark list control. When user tap on a list item, i want it to navigate to that correspondence page
<s:List id="list" width="100%" height="100%" labelField=" label">
<s:dataProvider>
<s:ArrayList>
<fx:Object label="Page One" />
<fx:Object label="Page Two" />
<fx:Object label="Page Three" />
<fx:Object label="Page Four" />
</s:ArrayList>
</s:dataProvider>
</s:List>
how do i code it so that when user tap on item label="Page One" it will navigate to PageOneView.mxml and if it tap on "Page Two" it will go to PageTwoView.mxml and so on.
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该列表应该调度一个更改事件。在该更改事件处理程序中,您可以将新视图推送到视图堆栈上:
The List should dispatch a change event. In that change event handler you can push the new view onto the view stack:
我喜欢这里的 switch 语句,因为您可以默认为一个操作,
只是一种不同的方式,适合我的逻辑,在 Flash Builder 4.6 中创建。
杰克
I like the switch statement here as you can default to an action,
Just a different way, suits my logic, created in Flash Builder 4.6.
Jacko