Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Extracting Responses
...
private String extractResponseFor(View view) {
RadioGroup options = (RadioGroup) view.findViewById(R.id.radio_group);
int selection = options.getCheckedRadioButtonId();
if (selection == -1) {
options.setBackgroundColor(getActivity().getResources().getColor(R.color.form_validation));
isFormValid = false;
return getString(R.string.unknown);
} else {
options.setBackgroundColor(0);
RadioButton button = (RadioButton) view.findViewById(selection);
return button.getText().toString();
}
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.