如何在屏幕上保持一个选项菜单始终 [英] how to keep an options menu always on the screen

查看:116
本文介绍了如何在屏幕上保持一个选项菜单始终的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要始终显示在屏幕上的选项菜单。我已经写了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();
}

这篇关于如何在屏幕上保持一个选项菜单始终的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆