setSelectedItemId

open fun setSelectedItemId(@IdRes itemId: Int)

Set the selected menu item ID. This behaves the same as tapping on an item.

Parameters

itemId

The menu item ID. If no item has this ID, the current selection is unchanged.

See also