Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Extracting Responses
private String extractResponseFor(View view) {
RadioGroup options = (RadioGroup) view.findViewById(;
int selection = options.getCheckedRadioButtonId();
if (selection == -1) {
isFormValid = false;
return getString(R.string.unknown);
} else {
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.