问题描述
参考:flex mobile TabbedViewNavigatorApplication 后退按钮
我有 2 个标签.Tab1 有 2 个子视图:
Tab1
Tab1subViewATab1subViewB
标签 2
子视图...
在 Tab1(Tab1SubViewA 是第一个视图)中,-> 我导航到 Tab1SubViewB(仍在 Tab1 下).
如何返回上一个视图 (Tab1SubViewA)?
注意:它不是在 Tab 之间移动,而是在同一个 Tab 中从一个视图移动到另一个视图.
Tab1SubViewA 的代码:
<s:Button click="{navigator.pushView(Tab1subViewB)}"/></s:查看>
TabbedViewNavigatorApplication 中的代码:
...<s:ViewNavigator firstView="views.Tab1subViewA" label="Page1" height="100%" width="100%" ><s:Button click="BackBtn(event)" label="Back"/></s:titleContent></s:ViewNavigator><s:ViewNavigator firstView="views.Tab1subViewB" label="Page2" height="100%" width="100%"><s:Button click="BackBtn(event)" label="Back"/></s:titleContent></s:ViewNavigator></s:TabbedViewNavigatorApplication>我找到了一种简单的方法,只需硬编码即可.如果您真的没有对每个选项卡的大量视图(并且大多数情况下都没有),那么硬编码并没有那么糟糕.好吧,如果有人想为上述问题提供非硬代码解决方案,欢迎.
Refer back to : flex mobile TabbedViewNavigatorApplication back button
I have 2 Tabs. Tab1 has 2 sub Views:
Tab1
Tab1subViewA
Tab1subViewB
Tab2
subview...
In Tab1 (Tab1SubViewA is the first View), -> I navigate to Tab1SubViewB (still under Tab1).
How can I go back to previous view (Tab1SubViewA)?
Note: it's not moving from Tab to Tab but moving from View to View all in the same Tab.
code for Tab1SubViewA:
<?
code in TabbedViewNavigatorApplication:
...
<s:ViewNavigator firstView="views.Tab1subViewA" label="Page1" height="100%" width="100%" >
<s:titleContent>
<s:Button click="BackBtn(event)" label="Back"/>
</s:titleContent>
</s:ViewNavigator>
<s:ViewNavigator firstView="views.Tab1subViewB" label="Page2" height="100%" width="100%">
<s:titleContent>
<s:Button click="BackBtn(event)" label="Back"/>
</s:titleContent>
</s:ViewNavigator>
</s:TabbedViewNavigatorApplication>
i found one simple way of doing it, just hard code it. If you really don't have a lot of views into each Tab (and mostly don't anyway), hard coding it is not that bad. Well, if anyone want to give a non-hard code solution to the above is welcome.
这篇关于flex mobile TabbedViewNavigatorApplication 后退按钮 part2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!