I am probably doing something stupid, but when I click on an option it
isn't selected.
Cheers for any help.
Java:
public class MenuTest extends Activity {
private final int OPTIONS_GROUP = 1;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
SubMenu optionsMenu = menu.addSubMenu("Convertion");
optionsMenu.add(OPTIONS_GROUP, 1, Menu.NONE, "Option
1").setChecked(true);
optionsMenu.add(OPTIONS_GROUP, 2, Menu.NONE, "Option 2");
optionsMenu.add(OPTIONS_GROUP, 3, Menu.NONE, "Option 3");
optionsMenu.setGroupCheckable(OPTIONS_GROUP, true, true);
return super.onCreateOptionsMenu(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 at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---