Skip to content

Most visited

Recently visited

navigation
Added in API level 11
Deprecated since API level 21

ActionBar.TabListener

public static interface ActionBar.TabListener

android.app.ActionBar.TabListener


This interface was deprecated in API level 21.
Action bar navigation modes are deprecated and not supported by inline toolbar action bars. Consider using other common navigation patterns instead.

Callback interface invoked when a tab is focused, unfocused, added, or removed.

Summary

Public methods

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

Called when a tab that is already selected is chosen again by the user.

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

Called when a tab enters the selected state.

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

Called when a tab exits the selected state.

Public methods

onTabReselected

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

Called when a tab that is already selected is chosen again by the user. Some applications may use this action to return to the top level of a category.

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)

Called when a tab enters the selected state.

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)

Called when a tab exits the selected state.

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.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.