Most visited

Recently visited

TabLayout.ViewPagerOnTabSelectedListener

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

java.lang.Object
   ↳ android.support.design.widget.TabLayout.ViewPagerOnTabSelectedListener


一个 TabLayout.OnTabSelectedListener类,其中包含必要的调用回到提供的 ViewPager以便标签位置保持同步。

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 android.support.design.widget.TabLayout.OnTabSelectedListener

Public constructors

TabLayout.ViewPagerOnTabSelectedListener

TabLayout.ViewPagerOnTabSelectedListener (ViewPager viewPager)

Parameters
viewPager ViewPager

Public methods

onTabReselected

void onTabReselected (TabLayout.Tab tab)

当用户再次选择了已经选择的标签时调用。 某些应用程序可能会使用此操作返回到类别的顶层。

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

onTabSelected

void onTabSelected (TabLayout.Tab tab)

当选项卡进入选定状态时调用。

Parameters
tab TabLayout.Tab: The tab that was selected

onTabUnselected

void onTabUnselected (TabLayout.Tab tab)

当选项卡退出选定状态时调用。

Parameters
tab TabLayout.Tab: The tab that was unselected

Hooray!