Question

I'm trying to use the TabGroup in Titanium Alloy, but hide the tab group buttons at the bottom of the screen.

In their documentation there is a property called navBarHidden, which it says will hide the bar if it is set to true. But it doesn't work.

<Window>
    <TabGroup id="mainTabGroup" navBarHidden="true" class="container">
        <Tab id="tab1" title="Tab 1">
            <Window id="win1" title="Tab 1">
               <Label id="label1" color="#999">I am Window 1</Label>
            </Window>
        </Tab>
        <Tab id="tab2" title="Tab 2">
            <Window id="win2" title="Tab 2">
                <Label id="label2" color="#999">I am Window 2</Label>
            </Window>
        </Tab>
        <!-- Use the Require tag to include external Ti.UI.Tab views -->
    </TabGroup>
</Window>

Am I missing something here?

Was it helpful?

Solution

I found out the problem. I need to put a Window inside a tab element and then add the tabBarHidden property. So my view XML file looks like similar to this:

<TabGroup id="mainTabGroup">

    <Tab>
        <Window id="mainWindow" title="The Title" tabBarHidden="true">

        </Window>
    </Tab>

</TabGroup>

And in my controller:

$.mainTabGroup.open();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top