public interface TabSwitcherListener
Modifier and Type | Method and Description |
---|---|
void |
onAllTabsRemoved(TabSwitcher tabSwitcher,
Tab[] tabs,
Animation animation)
The method, which is invoked, when all tabs have been removed from the tab switcher.
|
void |
onSelectionChanged(TabSwitcher tabSwitcher,
int selectedTabIndex,
Tab selectedTab)
The method, which is invoked, when the currently selected tab has been changed.
|
void |
onSwitcherHidden(TabSwitcher tabSwitcher)
The method, which is invoked, when the tab switcher has been hidden.
|
void |
onSwitcherShown(TabSwitcher tabSwitcher)
The method, which is invoked, when the tab switcher has been shown.
|
void |
onTabAdded(TabSwitcher tabSwitcher,
int index,
Tab tab,
Animation animation)
The method, which is invoked, when a tab has been added to the tab switcher.
|
void |
onTabRemoved(TabSwitcher tabSwitcher,
int index,
Tab tab,
Animation animation)
The method, which is invoked, when a tab has been removed from the tab switcher.
|
void onSwitcherShown(@NonNull TabSwitcher tabSwitcher)
tabSwitcher
- The observed tab switcher as an instance of the class TabSwitcher
. The tab
switcher may not be nullvoid onSwitcherHidden(@NonNull TabSwitcher tabSwitcher)
tabSwitcher
- The observed tab switcher as an instance of the class TabSwitcher
. The tab
switcher may not be nullvoid onSelectionChanged(@NonNull TabSwitcher tabSwitcher, int selectedTabIndex, @Nullable Tab selectedTab)
tabSwitcher
- The observed tab switcher as an instance of the class TabSwitcher
. The tab
switcher may not be nullselectedTabIndex
- The index of the currently selected tab as an Integer
value or -1, if the tab
switcher does not contain any tabsselectedTab
- The currently selected tab as an instance of the class Tab
or null, if the
tab switcher does not contain any tabsvoid onTabAdded(@NonNull TabSwitcher tabSwitcher, int index, @NonNull Tab tab, @NonNull Animation animation)
tabSwitcher
- The observed tab switcher as an instance of the class TabSwitcher
. The tab
switcher may not be nullindex
- The index of the tab, which has been added, as an Integer
valuetab
- The tab, which has been added, as an instance of the class Tab
. The tab may
not be nullanimation
- The animation, which has been used to add the tab, as an instance of the class Animation
. The animation may not be nullvoid onTabRemoved(@NonNull TabSwitcher tabSwitcher, int index, @NonNull Tab tab, @NonNull Animation animation)
tabSwitcher
- The observed tab switcher as an instance of the class TabSwitcher
. The tab
switcher may not be nullindex
- The index of the tab, which has been removed, as an Integer
valuetab
- The tab, which has been removed, as an instance of the class Tab
. The tab may
not be nullanimation
- The animation, which has been used to remove the tab, as an instance of the class
Animation
. The animation may not be nullvoid onAllTabsRemoved(@NonNull TabSwitcher tabSwitcher, @NonNull Tab[] tabs, @NonNull Animation animation)
tabSwitcher
- The observed tab switcher as an instance of the class TabSwitcher
. The tab
switcher may not be nulltabs
- An array, which contains the tabs, which have been removed, as an array of the type
Tab
or an empty array, if no tabs have been removedanimation
- The animation, which has been used to remove the tabs, as an instance of the class
Animation
. The animation may not be null