Remove Physical Button from OptionsMenu

0

We have an application where we are removing the action from the OptionsMenu of the physical button and inserting it into Toolbar .

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

I would like the Menu to be displayed only in Toolbar and not in the physical button.

    
asked by anonymous 02.09.2015 / 21:18

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!

    
02.09.2015 / 22:25