Most visited

Recently visited

Added in API level 11
Deprecated since API level 21

ActionBar.TabListener

public static interface ActionBar.TabListener

android.app.ActionBar.TabListener


该接口在API级别21中已被弃用。
内置工具栏操作栏不支持操作栏导航模式。 考虑改用其他common navigation patterns

在选项卡聚焦,未聚焦,添加或删除时调用的回调接口。

Summary

Public methods

abstract void onTabReselected(ActionBar.Tab tab, FragmentTransaction ft)

当用户再次选择了已经选择的标签时调用。

abstract void onTabSelected(ActionBar.Tab tab, FragmentTransaction ft)

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

abstract void onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft)

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

Public methods

onTabReselected

Added in API level 11
void onTabReselected (ActionBar.Tab tab, 
                FragmentTransaction ft)

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

Parameters
tab ActionBar.Tab: The tab that was reselected.
ft FragmentTransaction: A FragmentTransaction for queuing fragment operations to execute once this method returns. This FragmentTransaction does not support being added to the back stack.

onTabSelected

Added in API level 11
void onTabSelected (ActionBar.Tab tab, 
                FragmentTransaction ft)

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

Parameters
tab ActionBar.Tab: The tab that was selected
ft FragmentTransaction: A FragmentTransaction for queuing fragment operations to execute during a tab switch. The previous tab's unselect and this tab's select will be executed in a single transaction. This FragmentTransaction does not support being added to the back stack.

onTabUnselected

Added in API level 11
void onTabUnselected (ActionBar.Tab tab, 
                FragmentTransaction ft)

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

Parameters
tab ActionBar.Tab: The tab that was unselected
ft FragmentTransaction: A FragmentTransaction for queuing fragment operations to execute during a tab switch. This tab's unselect and the newly selected tab's select will be executed in a single transaction. This FragmentTransaction does not support being added to the back stack.

Hooray!