Skip to main content

RadioGroup()

Add radio group to dialog view, each child view contains Radio Button

Constructor​

RadioGroup(id: number)
RadioGroup(id: number, defaultButtonId: number)

Parameters​

ParametersTypeDescription
idnumberUnique identifier or label of the button, the id is used by Dialog:getValueById()
defaultButtonIdnumberOptional radio button id that should be selected by default

Notes​

  • The second parameter is optional
  • defaultButtonId should match one of the RadioButton ids added into this group
  • If the provided button id is not found, the dialog falls back to the first radio button
  • The default is only the starting answer: once the user has answered, their saved answer is used on every later run
  • Like every dialog item, it has showWhen(), hideWhen() and setHelp()