Codenameone 如何使用Codename One在滑动选项卡中获取当前选项卡值?
我们正在研究代号为“Swipe Tabs”的方法,我们需要当前的选项卡索引值,但是getSelectedIndex()方法提供了以前的选项卡索引值,如何获取当前选项卡索引Codenameone 如何使用Codename One在滑动选项卡中获取当前选项卡值?,codenameone,Codenameone,我们正在研究代号为“Swipe Tabs”的方法,我们需要当前的选项卡索引值,但是getSelectedIndex()方法提供了以前的选项卡索引值,如何获取当前选项卡索引 public int getSelectedIndex() Returns the currently selected index for this tabbedpane. Returns -1 if there is no currently selected tab. Returns: the index o
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()返回当前选项卡索引,其中第一个选项卡的索引为0,第二个选项卡的索引为1,依此类推。
请发布您的代码(如果可能)我假设您使用了选项卡选择侦听器。请注意,该回调的参数包括两个整数,即新旧选项卡的偏移量。