I have an Activity that works fine, loads app and displays all the
data as expected. I tried to add a simple menu, but when I start up
the emulator, the menu button doesn't work. Nothing responds. Also, I
have noticed if I click on the letters on the keypad to the right,
some chinese/japanese letters start popping up at the bottom of the
screen, and usually fill in whatever text box I am typing in with
those characters instead of English.
I am doing all of this in a 2.0 emulated device. Here is my AVD
details:
Target: Android 2.0 (API level 5)
Skin: HVGA
SD Card: 1000M
hw.lcd.density: 160
Here is the code (compiles and loads fine; just no response from the
menu button):
@Override
public boolean onCreateOptionsMenu(final Menu menu) {
super.onCreateOptionsMenu(menu);
menu.add(0, GamesDashboard.MENU_GET_REPORT, 0, getResources
().getText(R.string.app_short_name))
.setIcon(android.R.drawable.ic_menu_more);
menu.add(0, GamesDashboard.MENU_VIEW_SAVED_LOCATIONS, 1,
getResources().getText
(R.string.app_name_team_selection)).setIcon
(android.R.drawable.ic_menu_myplaces);
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onMenuItemSelected(final int featureId, final
MenuItem item) {
switch (item.getItemId()) {
case MENU_VIEW_SAVED_LOCATIONS:
Intent intent = new Intent(GamesDashboard.this,
GamesDashboard.class);
startActivity(intent);
break;
case MENU_GET_REPORT:
break;
}
return super.onMenuItemSelected(featureId, item);
}
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" 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-beginners?hl=en