Skip to content

How to use in java: setMenuItemClickListener? #101

@panovvitalik

Description

@panovvitalik

How I can implement menu item click on java? Which parameter type I should provide to setMenuItemClickListener method

ContextMenuDialogFragment contextMenuDialogFragment = ContextMenuDialogFragment.newInstance(menuParams);
contextMenuDialogFragment.setMenuItemClickListener(???);

He show me the tint:

Required type: Function2

What is it?

If I try to provide this with implemented: MenuItem.OnMenuItemClickListener interface, I get such error:

Required type:
Function2
Provided:
OnMenuItemClickListener

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions