Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to keep an options menu always on the screen

I need the options menu to be displayed on screen always.. I've written the code to open options menu on the startup of an activity..

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

But on clicking on another item on the screen, the menu goes down.. I want the menu to be on screen always.. Is there any way to do that?

like image 725
Deepzz Avatar asked Nov 03 '22 15:11

Deepzz


1 Answers

Please try the following code:

@Override
public void onOptionsMenuClosed(Menu menu) {
openOptionsMenu();
}
like image 74
Anu Avatar answered Nov 08 '22 12:11

Anu