Application type:mobile,titanium sdk:3.5.1,titanium studio:3.4.2,platform:android and iOS,Device:simulator,emulator,OS:Mac OSX10.9.5,
How to have animations for the tab in iPhone and android while moving from one tab to another tab.
I have seen in documentation that from iOS 7 Ti.UI.Tab supports transitions.But I am unable to do.Can anyone please help me.
index.xml
<Alloy> <TabGroup id="tabGroup"> <Tab title="tab1"> <Window backgroundColor="red" id="tabWin1"></Window> </Tab> <Tab title="tab2"> <Window backgroundColor="#bdbdbd" id="tabWin2"></Window> </Tab> <Tab title="tab3"> <Window backgroundColor="#38c" id="tabWin3"></Window> </Tab> <Tab title="tab4"> <Window backgroundColor="blue" id="tabWin4"></Window> </Tab> </TabGroup> </Alloy>index.js
$.tabGroup.open(); $.tabGroup.addEventListener('swipe', function(e) { var activeTabIndex=$.tabGroup.tabs.indexOf($.tabGroup.activeTab); if(e.direction==='right'&&activeTabIndex>0) { $.tabGroup.setActiveTab(activeTabIndex-1); } else if(e.direction==='left'&&activeTabIndex<$.tabGroup.tabs.length-1) { $.tabGroup.setActiveTab(activeTabIndex+1); } });