Remove the action from the Optionsmenu’s physical button

Asked

Viewed 31 times

0

We have an application in which we are removing the action of OptionsMenu of the physical button and inserting in the Toolbar.

I wonder if it is possible to undo the action of the physical Menu button?

I would like the Menu to be displayed only on Toolbar and no longer on the physical button.

1 answer

1

I was able to solve my problem by writing the following method: onMenuOpened :

@Override
public boolean onMenuOpened(int featureId, Menu menu) {
    return false;

}

This method is invoked only when I click the physical button!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.