As always, keep the options menu on the screen

I need the options menu to always appear on the screen. I wrote code to open the options menu when the action started.

@Override
    public void onAttachedToWindow() {
        openOptionsMenu(); 
    };

But when you click on another item on the screen, the menu decreases. I want the menu to always be displayed on the screen. Is there any way to do this?

+5
source share
1 answer

Please try the following code:

@Override
public void onOptionsMenuClosed(Menu menu) {
openOptionsMenu();
}
+2
source

All Articles