Reputation: 119
We are working on Codename One "Swipe Tabs", we need the current tab index value but the method getSelectedIndex() giving us the previous tab index value on swipe, how can I get the current tab index?
Upvotes: 1
Views: 68
Reputation: 1907
public int getSelectedIndex()
Returns the currently selected index for this tabbedpane. Returns -1 if there is no currently selected tab.
Returns:
the index of the selected tab
getSelectedIndex() return the current tab index in which index of first tab is 0 and index of second tab is 1 and so on. Please post your code (if possible)
Upvotes: 1