You can have one, yes.. if your dialog is a separate view/activity. However,
why would a dialog have an options menu? I've never seen any UI that when a
dialog is displayed, allows you to still work the menu as well. It would not
be a normal thing anyone would know to do. If the dialog is a completely
different full screen (so not really a dialog), then its probably fine. But
a "modal" dialog that displays over an activity/view waiting usually on some
button press or input, doesn't make sense to me.

On Wed, Jan 27, 2010 at 4:23 PM, rkg <[email protected]> wrote:

> Hi,
>
> I am trying to display menu options while showing an AlertDialog i.e.
> when MENU key is pressed, it should show whatever options that have
> been created. I read the following in the Dev Guide at
> developer.android.com -
>
> -------------------
> A dialog should not have an Options menu
> When a dialog is displayed, pressing the MENU button should do
> nothing. This also holds true for activities that look like dialogs. A
> dialog box is recognizable by being smaller than full-screen, having
> zero to three buttons, is non-scrollable, and possibly a list of
> selectable items that can include checkboxes or radio buttons.
>
> The rationale behind not having a menu is that when a dialog is
> displayed, the user is in the middle of a procedure and should not be
> allowed to start a new global task (which is what the Option menu
> provides).
> --------------------
>
> However, I also see that there are methods such as -
> onPrepareOptionsMenu(), onOptionsItemSelected() etc. which make me
> think it may be possible to have menu options for the dialog also.
>
> Could anyone please clarify if it is possible to have menu options for
> a dialog?
>
> Thanks in advance,
> Renu
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to