简体   繁体   English

Android-如何隐藏上下文菜单标题?

[英]Android - How to hide Context Menu Title?

I would like to remove the Context Menu Title so that I can show more menu items on the bar. 我想删除上下文菜单标题,以便可以在栏中显示更多菜单项。 Search quite a bit, tried setTitleOptionalHint and other stuff but in vain. 搜索了很多,尝试了setTitleOptionalHint和其他东西,但是徒劳。 Appreciate your help in sharing with me with way to achieve this. 感谢您与我分享实现此目的的帮助。

I tried the methods listed in this link but did not work - Remove Title from Contextual Action Bar 我尝试了此链接中列出的方法,但不起作用- 从上下文操作栏中删除标题

If you want to show more context menu items, set their setShowAsAction to Always after inflating the context menu (at run time). 如果要显示更多上下文菜单项,请在扩展上下文菜单后(在运行时)将其setShowAsAction设置为Always。 Fromm what I have seen, only this works. 我所见的弗洛姆(Fromm),仅此有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM