flex mobile TabbedViewNavigatorApplication 后退按钮 part2 [英] flex mobile TabbedViewNavigatorApplication back button part2

查看:22
本文介绍了flex mobile TabbedViewNavigatorApplication 后退按钮 part2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

参考: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:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" title="Tab1subViewA">

<s:Button click="{navigator.pushView(Tab1subViewB)}" />
</s:View>

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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