Most visited

Recently visited

ActionBar.TabListener

public static interface ActionBar.TabListener

android.support.v7.app.ActionBar.TabListener


此接口已弃用。
内置工具栏操作栏不支持操作栏导航模式。 考虑使用其他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

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

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

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!