Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 22.2.0
belongs to Maven artifact com.android.support:design:27.1.0

TabLayout.OnTabSelectedListener

public static interface TabLayout.OnTabSelectedListener

android.support.design.widget.TabLayout.OnTabSelectedListener
Known Indirect Subclasses


Callback interface invoked when a tab's selection state changes.

Summary

Public methods

abstract void onTabReselected(TabLayout.Tab tab)

Called when a tab that is already selected is chosen again by the user.

abstract void onTabSelected(TabLayout.Tab tab)

Called when a tab enters the selected state.

abstract void onTabUnselected(TabLayout.Tab tab)

Called when a tab exits the selected state.

Public methods

onTabReselected

added in version 22.2.0
void onTabReselected (TabLayout.Tab tab)

Called when a tab that is already selected is chosen again by the user. Some applications may use this action to return to the top level of a category.

Parameters
tab TabLayout.Tab: The tab that was reselected.

onTabSelected

added in version 22.2.0
void onTabSelected (TabLayout.Tab tab)

Called when a tab enters the selected state.

Parameters
tab TabLayout.Tab: The tab that was selected

onTabUnselected

added in version 22.2.0
void onTabUnselected (TabLayout.Tab tab)

Called when a tab exits the selected state.

Parameters
tab TabLayout.Tab: The tab that was unselected