Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

TabLayout.BaseOnTabSelectedListener

public static interface TabLayout.BaseOnTabSelectedListener

com.google.android.material.tabs.TabLayout.BaseOnTabSelectedListener<T extends com.google.android.material.tabs.TabLayout.Tab>
Known Indirect Subclasses


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

Summary

Public methods

abstract void onTabReselected(T tab)

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

abstract void onTabSelected(T tab)

Called when a tab enters the selected state.

abstract void onTabUnselected(T tab)

Called when a tab exits the selected state.

Public methods

onTabReselected

void onTabReselected (T 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 T: The tab that was reselected.

onTabSelected

void onTabSelected (T tab)

Called when a tab enters the selected state.

Parameters
tab T: The tab that was selected

onTabUnselected

void onTabUnselected (T tab)

Called when a tab exits the selected state.

Parameters
tab T: The tab that was unselected