Hello,

In which method is this code written? I believe this part has to go
inside onCreateOptionsMenu(Menu myMenu) itself. myMenu would be a
parameter, and after adding menuItems to it, you need to return it
back.

Thanks,
Priyanka

On Apr 22, 1:10 pm, 智超 薛 <[email protected]> wrote:
> hey all!
>
> meet a question about menu.
>
> i want to push a button to pop-up menu,
>
> my coding is
>
> case R.id.menus:
> if(myMenu==null) {
>                                         myMenu.add(0, 0, 0, 
> "Add").setIcon(R.drawable.addfolderr);
>                                         myMenu.add(0, 1, 0, 
> "Delete").setIcon(R.drawable.delete);
>                                                                         }
>                                 onCreateOptionsMenu(myMenu);
> braek;
>
> but onCreateOptionsMenu(myMenu) is not work ,
> how to make it work ,or had other way to realize button pop-up menu ?
>
> --
> 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 
> athttp://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