我可以在对话框中添加选项菜单中? [英] Can I add option menu in Dialog?
本文介绍了我可以在对话框中添加选项菜单中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的对话框添加选项菜单。我试试这个。但是我的选择不是对话。怎么我能做到这一点的菜单上显示的布局?
I want to add option menu on my Dialog . I try this .But my option menu is displayed on layout not on dialog .How can I do that ?
推荐答案
您可以做到这一点,如果你创建主题对话框一个活动。但仍菜单会,因为多数民众赞成在屏幕下方看到如何可以显示一个菜单。如果你希望它是在对话框,然后创建一个对话的主题活动中,添加一个ListView和覆盖的onkeydown()
方法来显示的选项列表时,菜单按钮为pressed。
You can do that if you create an Activity with Theme Dialog. but still Menu will be Shown below the Screen since thats how a menu can be shown. if you want it to be on Dialog, then create Activity with Dialog theme, add a ListView and override onKeyDown()
method to show a list of options when menu button is pressed.
这篇关于我可以在对话框中添加选项菜单中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文