如何在活动开始时显示选项菜单

发布于 2024-10-06 02:44:34 字数 93 浏览 0 评论 0原文

我想要在活动上显示选项菜单。但是,我希望在显示活动时始终显示选项菜单。我不希望我的用户单击(选择)菜单按钮来显示它。我希望它一直都在那里。我该怎么做?

谢谢

I've activity that i want an option menu to be displayed on. But, i want the option menu to be displayed all the time the activity is displayed. I don't want my users to click (select) the menu button to display it. I want it to be there all the time. How can i do it?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月隐月明月朦胧 2024-10-13 02:44:35

Activity.openOptionsMenu()

从设计的角度来看,我必须同意 Mayra 的观点。一开始就采取了错误的方法。

Activity.openOptionsMenu().

From a design standpoint, I have to agree with Mayra. Wrong approach to begin with.

紫瑟鸿黎 2024-10-13 02:44:35

如果您希望选项始终显示在屏幕底部,请不要使用选项菜单。只需将按钮放在屏幕底部即可。

但是,请记住,这违背了“Android 方式”的做事方式,因此请确保您了解 Android 用户将如何期望您的应用程序的外观和工作方式,并且您有充分的理由做一些不同的事情。

If you want options to appear at the bottom of the screen always, don't use the options menu. Just place buttons at the bottom of your screen.

However, keep in mind that this goes against the "Android way" of doing things, so make sure you understand how Android users are going to expect your application to look and work, and you have a good reason for doing something different.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文