tabGroup open event
Hello,
I want to add the event 'open' to my tabGroup. But when i add this nothing happens.
Anyone a solution for this?
Greetings,
Jacob
2 Answers
-
Jacob
Currently on android, there is no support for closing a tabgroup, so usually you would open it at the start of your app, as the root of all windows. Thus, probably the best workaround for you would be to listen to the focus event on the first window loaded by the tabgroup. If you add the windows after you open the tabgroup, then this should fire the events in the right sequence.
-
an open on the tabGroup will fire when the group is open, which will in most cases only happen once when the app is launched.
Is what you are looking for when a specific tab is opened? Then you can capture the "blur" event like this
tabGroup.addEventListener('blur', function(e) { Titanium.API.info(" tab index: " +e.index ); Titanium.API.info(" prev index: " + e.previousIndex); });