Alloy nl.fokkezb.drawer widget更改statusbarstyle

时间:2014-04-15 09:44:18

标签: ios titanium titanium-alloy drawer

我需要将statusbarstyle更改为Black,我不知道如何......我试图把

INDEX.XML:

<Alloy>
    <Widget id="drawer" src="nl.fokkezb.drawer">
        <Window role="leftWindow" module="xp.ui">

        </Window>
        <NavigationWindow id="navWindow" platform="ios" role="centerWindow">
            <Window >
                <LeftNavButton>
                    <Button id="leftButton" onClick="toggleLeft">ICON</Button>
                </LeftNavButton>
                <RightNavButton>
                    <Button id="rightButton">ICON</Button>
                </RightNavButton>
            </Window>
        </NavigationWindow>
        <View platform="android" role="centerWindow">

        </View>
    </Widget>
</Alloy>

这是Index.tss类

"#drawer": {
    openDrawerGestureMode: "OPEN_MODE_ALL",
    closeDrawerGestureMode: "CLOSE_MODE_ALL",
    leftDrawerWidth: 200,
    exitOnClose: true,
    navBarHidden: true,
    fullscreen: true,
statusBarStyle: "STATUSBAR_BLACK"
    },

1 个答案:

答案 0 :(得分:0)

Titanium.UI.Window.statusBarStyle property接受以下值之一:

在您的情况下,您可以尝试以下代码:

"#drawer": {
    openDrawerGestureMode: "OPEN_MODE_ALL",
    closeDrawerGestureMode: "CLOSE_MODE_ALL",
    leftDrawerWidth: 200,
    exitOnClose: true,
    navBarHidden: true,
    fullscreen: true,
    statusBarStyle: Ti.UI.iPhone.StatusBar.OPAQUE_BLACK,
}

还要确保#drawer指向Window视图元素。我不知道你的小工具抽屉是如何工作的。