Most visited

Recently visited

Added in API level 11
Deprecated since API level 21

ActionBar.OnNavigationListener

public static interface ActionBar.OnNavigationListener

android.app.ActionBar.OnNavigationListener


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

ActionBar导航事件的监听器接口。

Summary

Public methods

abstract boolean onNavigationItemSelected(int itemPosition, long itemId)

只要选择了操作栏中的导航项目,就会调用此方法。

Public methods

onNavigationItemSelected

Added in API level 11
boolean onNavigationItemSelected (int itemPosition, 
                long itemId)

只要选择了操作栏中的导航项目,就会调用此方法。

Parameters
itemPosition int: Position of the item clicked.
itemId long: ID of the item clicked.
Returns
boolean True if the event was handled, false otherwise.

Hooray!