Reputation: 688
I've a tabgroup with two tabs in each tab i user a alert dialog but it is only shown once.
I start the app first tab get's opened and alert dialog is shown, then i switch to the second tab and back to the first but in this case no alert dialog is shown. What's the problem?
Upvotes: 0
Views: 133
Reputation: 2031
you have to use tabGroup.addEventListener
to get the alert dialog, add the below code in your tabGroup page. Hope this helps you
tabGroup.addEventListener('focus', function(event) {
Ti.API.info("current tab index = "+event.index);
Ti.API.info("previous tab index = "+event.previousIndex);
});
Upvotes: 1