Skip to content

Commit

Permalink
Updated code to set the radio button in a radio group using radio gro…
Browse files Browse the repository at this point in the history
…ups check api instead of radio button apis (#1691)
  • Loading branch information
aditya-07 committed Nov 1, 2022
1 parent 4cfc307 commit 147e61c
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,13 @@ internal object QuestionnaireItemBooleanTypePickerViewHolderFactory :

when (questionnaireItemViewItem.answers.singleOrNull()?.valueBooleanType?.value) {
true -> {
yesRadioButton.isChecked = true
noRadioButton.isChecked = false
radioGroup.check(yesRadioButton.id)
}
false -> {
yesRadioButton.isChecked = false
noRadioButton.isChecked = true
radioGroup.check(noRadioButton.id)
}
null -> {
yesRadioButton.isChecked = false
noRadioButton.isChecked = false
radioGroup.clearCheck()
}
}

Expand Down

0 comments on commit 147e61c

Please sign in to comment.