为什么SearchBarManager的搜索栏打开时打不开选项菜单?
我制作了一个使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看这个教程。它展示了如何将
onCreateOptionsMenu
与SearchManager
结合使用。Have a look at this tutorial. It shows how you can use the
onCreateOptionsMenu
with theSearchManager
.