Hi, here is my code
private boolean populateMenu(Menu menu) {
boolean result = super.onCreateOptionsMenu(menu);
MenuItem item1 = menu
.add(0, TAG_INSERT_ID, 0, R.string.menu_create);
item1.setAlphabeticShortcut('o');
item1.setIcon(R.drawable.add);
item1 = menu.add(0, TAG_REMOVE_ID, 0, R.string.menu_delete);
item1.setAlphabeticShortcut('i');
item1.setIcon(R.drawable.delete);
item1 = menu.add(0, TAG_EDIT_ID, 0, R.string.menu_edit);
item1.setAlphabeticShortcut('p');
item1.setIcon(R.drawable.rename);
item1 = menu.add(0, TAG_HELP_ID, 0, R.string.menu_rename);
item1.setAlphabeticShortcut('/');
item1.setIcon(R.drawable.help);
return result;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
populateMenu(menu);
return true;
//return populateMenu(menu);
}
I've tried various combinations of this and couldn't find out what changed.
Thanks,
Teo
This has not been removed or changed AFAIK and it continues to work for me.What
exactly are you doing?
Post by TeoHi,
onCreateOptionsMenu for my app isn't called anymore. I tried with SDK
1.0 just yesterday and it worked; today (still on SDK 1.0) the
function isn't called anymore and nothing happens when i hit Menu.
What might be the problem?
Thanks in advance,
Teo
--
Teo (a.k.a. Teodor Filimon, Teominator)
Site - www.teodorfilimon.com | Blog - www.teodorfilimon.blogspot.com
GMT +2 (or PDT +10)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers-***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---