开发者

Opening Options Menu with Dialog Open

开发者 https://www.devze.com 2023-03-22 06:10 出处:网络
This seems like a pretty simple question, but I\'m not sure if it\'s even possible. Is it possible to allow the MENU button to still bring up the option\'s menu when a dialog is showing on top? I want

This seems like a pretty simple question, but I'm not sure if it's even possible. Is it possible to allow the MENU button to still bring up the option's menu when a dialog is showing on top? I want to do this because I want to give the us开发者_StackOverflower some more options while a dialog is opened.


I don't think that is possible.

Although the docs say that you should be able to do this.

A dialog is always created and displayed as a part of an Activity. You should normally create dialogs from within your Activity's onCreateDialog(int) callback method. When you use this callback, the Android system automatically manages the state of each dialog and hooks them to the Activity, effectively making it the "owner" of each dialog. As such, each dialog inherits certain properties from the Activity. For example, when a dialog is open, the Menu key reveals the options menu defined for the Activity and the volume keys modify the audio stream used by the Activity.

http://developer.android.com/guide/topics/ui/dialogs.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号