I want to add both bottom and top tab bars on the same view - its a flex mobile view. I tried this with but when I create two tab bars on a view only one of them is viewed - the bottom one. But if I delete the bottom one it displays the upper tab bar. Any suggestions on displaying both of them in the same screen?
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
title="">
<s:TabbedViewNavigator id="tb_hastaUp" width="100%" height="100%" skinClass="skins.TabbedViewNavigatorSkin">
<s:ViewNavigator label="view1" width="100%" height="100%" firstView="views.view1" />
<s:ViewNavigator label="view2" width="100%" height="100%" firstView="views.view2" />
<s:ViewNavigator label="view3" width="100%" height="100%" firstView="views.view3" />
</s:TabbedViewNavigator>
<s:TabbedViewNavigator id="tb_hastaBottom" width="100%" height="100%" skinClass="spark.skins.mobile.TabbedViewNavigatorSkin">
<s:ViewNavigator label="view1" width="100%" height="100%" firstView="views.view1"/>
<s:ViewNavigator label="view2" width="100%" height="100%" firstView="views.view2" />
<s:ViewNavigator label="view3" width="100%" height="100%" firstView="views.view3" />
</s:TabbedViewNavigator>
</s:View>
And here is my TabbedViewNavigatorSkin:
override protected function layoutContents(unscaledWidth:Number, unscaledHeight:Number):void
{
super.layoutContents(unscaledWidth, unscaledHeight);
var tabBarHeight:Number = 0;
if (tabBar.includeInLayout)
{
tabBarHeight = Math.min(tabBar.getPreferredBoundsHeight(), unscaledHeight);
tabBar.setLayoutBoundsSize(unscaledWidth, tabBarHeight);
tabBar.setLayoutBoundsPosition(0, 0);
tabBarHeight = tabBar.getLayoutBoundsHeight();
// backgroundAlpha is not a declared style on ButtonBar
// TabbedViewNavigatorButtonBarSkin implements for overlay support
var backgroundAlpha:Number = (_isOverlay) ? 0.75 : 1;
tabBar.setStyle("backgroundAlpha", backgroundAlpha);
}
if (contentGroup.includeInLayout)
{
var contentGroupHeight:Number = (_isOverlay) ? unscaledHeight : Math.max(unscaledHeight - tabBarHeight, 0);
contentGroup.setLayoutBoundsSize(unscaledWidth, contentGroupHeight);
contentGroup.setLayoutBoundsPosition(0, tabBarHeight);
}
}
I want to achieve a view like the below: