如何在屏幕上保持一个选项菜单始终选项、菜单、如何在、屏幕上

2023-09-07 23:57:40 作者:难瘦

我要始终显示在屏幕上的选项菜单。我已经写了code上打开一个活动的启动选项菜单。

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?

推荐答案

请尝试以下code:

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