How to change tabbars selection dynamically.
Hello,
I have added two tab bars in navigation area and toolbar area
but I want to change it, selected and unselected by code without clicking on that particular tabbed bar how it is possible?
1 Answer
-
Use tabGroup.setActiveTab(x);
where tabGroup is the name of your tab group and x is the index (numbers start at 0) of the tab you want to change to.
so if you wanted to go to the first tab then you would do:
tabGroup.setActiveTab(0);