【问题标题】:Flex Mobile TabbedView Applicatin Hide tabbar in statesFlex Mobile TabbedView 应用程序在状态下隐藏标签栏
【发布时间】:2012-09-24 01:46:49
【问题描述】:

我正在 Flash Builder 4.6 中构建一个选项卡式视图移动应用程序,并希望在其中包含一个登录屏幕。

我有 5 个选项卡,在第一个视图页面上我有 2 个状态。

一种状态用于登录,另一种状态用于实际选项卡本身。我可以制作这些,但想在它处于登录状态时隐藏标签栏。

我发现了一些可以通过单击按钮将其关闭的功能,但是在第一个视图页面(登录状态)中将其关闭怎么样。

我试过这个:

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        textAlign="center" title="Daily Settings"
    creationComplete="view2_creationCompleteHandler(event)">
    ...
protected function view2_creationCompleteHandler(event:FlexEvent):void
            {
                // TODO Auto-generated method stub
                this.tabBarVisible = false;
            }

但奇怪的是,它只会在某些时刻消失,而不是一直消失……

【问题讨论】:

  • 我可以使用预初始化来做到这一点!接下来是我想在其中放入一个 if 函数。 if (currentState == "Login") { // TODO 自动生成的方法存根 this.tabBarVisible = false; } 其他 { this.tabBarVisible = true;但这不起作用大声笑...

标签: hide tabbar states


【解决方案1】:

在另一个线程上得到它(抱歉重复发布......猜编程让我发疯) Hide tabbar in login state flex builder

<?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"
        currentState="login" tabBarVisible="{currentState!='login'}">
    <s:actionContent>
        <s:Button includeIn="login" label="login" click="currentState='planner'"/>
    </s:actionContent>
    <s:states>
        <s:State name="login"/>
        <s:State name="planner"/>
    </s:states>
</s:View>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-10-18
    • 2011-02-23
    • 2014-11-26
    • 2013-10-01
    • 2011-03-12
    • 2015-04-30
    • 2011-05-14
    相关资源
    最近更新 更多