What you should do is in your xml:
<RadioGroup
android:id="@+id/radio_chilled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/radio_chilled"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="true"
/>
<RadioButton
android:id="@+id/radio_not_chilleed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="false"/>
</RadioGroup>
and then you create a function to retrive the selected value :
private RadioGroup chilledGroup;
public void setChilledFromView()
{
int selectedId = chilledGroup.getCheckedRadioButtonId();
chilledRadioBtn = (RadioButton) getView().findViewById(selectedId);
isChilled = chilledRadioBtn.getText().toString();
if (gender.equals("true")) {
isChilled = "chilled deliver";
} else if (gender.equals("false") {
isChilled = "it is not chilled deliver";
}
}