Interface TabLayout.OnTabSelectedListener

All Known Implementing Classes:
TabLayout.ViewPagerOnTabSelectedListener
Enclosing class:
TabLayout

public static interface TabLayout.OnTabSelectedListener
Callback interface invoked when a tab's selection state changes.
  • Method Details

    • onTabSelected

      default void onTabSelected(@NonNull TabLayout.Tab tab)
      Called when a tab enters the selected state.
      Parameters:
      tab - The tab that was selected
    • onTabUnselected

      default void onTabUnselected(@NonNull TabLayout.Tab tab)
      Called when a tab exits the selected state.
      Parameters:
      tab - The tab that was unselected
    • onTabReselected

      default void onTabReselected(@NonNull 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 - The tab that was reselected.