为什么SearchBarManager的搜索栏打开时打不开选项菜单?

发布于 2024-11-27 17:46:17 字数 122 浏览 4 评论 0原文

我制作了一个使用 SearchManager 的 Android 应用程序。问题是当搜索栏打开时,菜单按钮不起作用。但在其他应用程序中,选项按钮的反应非常好。有没有办法在搜索栏打开时运行 onCreateOptionsMenu ?

I made ​​an Android application that uses that uses the SearchManager. The problem is that when the search bar is open, the menu button is not working. But in the rest of the aplications, the option button responds very well. Is there a way to run onCreateOptionsMenu when the search bar is open?

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

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

发布评论

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

评论(1

傲影 2024-12-04 17:46:17

看看这个教程。它展示了如何将 onCreateOptionsMenuSearchManager 结合使用。

Have a look at this tutorial. It shows how you can use the onCreateOptionsMenu with the SearchManager.

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