You can add items to you menu via the following add method:
add(int groupId, int itemId, int order, CharSequence title)
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
menu.add(0, 0, 0, "AutoComplete");
menu.add(0, 1, 1, "Button");
menu.add(0, 2, 2, "CheckBox");
menu.add(0, 3, 3, "EditText");
menu.add(0, 4, 4, "RadioGroup");
menu.add(0, 5, 5, "Spinner");
}
On Oct 28, 7:50 am, disappearedng <[EMAIL PROTECTED]> wrote:
> I actually realized that my code will work for the following:
>
> public boolean onCreateOptionsMenu(Menu menu) {
> super.onCreateOptionsMenu(menu);
>
> menu.add("AutoComplete");
> menu.add("Button");
> menu.add("CheckBox");
> menu.add("EditText");
> menu.add("RadioGroup");
> menu.add("Spinner");
> }
>
> Then what has happened to all the Group, ID parameters?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---