Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

TabLayout.TabLayoutOnPageChangeListener

public static class TabLayout.TabLayoutOnPageChangeListener
extends Object implements ViewPager.OnPageChangeListener

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


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

This class stores the provided TabLayout weakly, meaning that you can use addOnPageChangeListener(OnPageChangeListener) without removing the listener and not cause a leak.

Summary

Public constructors

TabLayout.TabLayoutOnPageChangeListener(TabLayout tabLayout)

Public methods

void onPageScrollStateChanged(int state)
void onPageScrolled(int position, float positionOffset, int positionOffsetPixels)
void onPageSelected(int position)

Inherited methods

From class java.lang.Object
From interface androidx.viewpager.widget.ViewPager.OnPageChangeListener

Public constructors

TabLayout.TabLayoutOnPageChangeListener

TabLayout.TabLayoutOnPageChangeListener (TabLayout tabLayout)

Parameters
tabLayout TabLayout

Public methods

onPageScrollStateChanged

void onPageScrollStateChanged (int state)

Parameters
state int

onPageScrolled

void onPageScrolled (int position, 
                float positionOffset, 
                int positionOffsetPixels)

Parameters
position int

positionOffset float

positionOffsetPixels int

onPageSelected

void onPageSelected (int position)

Parameters
position int