Code example for RadioGroup

Methods: getCheckedRadioButtonId, findViewById

0
		getMenuInflater().inflate(R.menu.main, menu);
		return true; 
	} 
	 
	private void showSelectedSpecies() { 
		int id = _group.getCheckedRadioButtonId();
		if(id != -1) {
			RadioButton button = (RadioButton) _group.findViewById(id);
			showSpecies(_species.getSpeciesByName((String) button.getText()));
		} 
	} 
	 
	private void showSpecies(Species species) {
		Intent intent = new Intent(this, SpeciesViewActivity.class);
		intent.putExtra(SpeciesViewActivity.BUNDLE_KEY, species);
		startActivity(intent);
	} 
	 
	private void confirm() { 
		int id = _group.getCheckedRadioButtonId();
		if(id != -1) {