Interface MenuItem.OnMenuItemClickListener

Enclosing interface:
MenuItem
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface MenuItem.OnMenuItemClickListener
Interface definition for a callback to be invoked when a menu item is clicked.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Called when a menu item has been invoked.
  • Method Details

    • onMenuItemClick

      boolean onMenuItemClick(@NonNull MenuItem item)
      Called when a menu item has been invoked. This is the first code that is executed; if it returns true, no other callbacks will be executed.
      Parameters:
      item - The menu item that was invoked.
      Returns:
      Return true to consume this click and prevent others from executing.