TabLayout.ViewPagerOnTabSelectedListener

public static class TabLayout.ViewPagerOnTabSelectedListener
extends Object implements TabLayout.OnTabSelectedListener

java.lang.Object
   ↳ com.google.android.material.tabs.TabLayout.ViewPagerOnTabSelectedListener


A TabLayout.OnTabSelectedListener class which contains the necessary calls back to the provided ViewPager so that the tab position is kept in sync.

Summary

Public constructors

TabLayout.ViewPagerOnTabSelectedListener(ViewPager viewPager)

Public methods

void onTabReselected(TabLayout.Tab tab)
void onTabSelected(TabLayout.Tab tab)
void onTabUnselected(TabLayout.Tab tab)

Inherited methods

From class java.lang.Object
From interface com.google.android.material.tabs.TabLayout.BaseOnTabSelectedListener

Public constructors

TabLayout.ViewPagerOnTabSelectedListener

TabLayout.ViewPagerOnTabSelectedListener (ViewPager viewPager)

Parameters
viewPager ViewPager

Public methods

onTabReselected

void onTabReselected (TabLayout.Tab tab)

Parameters
tab TabLayout.Tab

onTabSelected

void onTabSelected (TabLayout.Tab tab)

Parameters
tab TabLayout.Tab

onTabUnselected

void onTabUnselected (TabLayout.Tab tab)

Parameters
tab TabLayout.Tab