Beksa
Beksa

Reputation: 3

How to deselect RadioButton so all Options 1,2,3 can be clear again

just in brief, RadioButtons in RadioGroup. Boolean with method case-if. Everything works and can be switched between three RadioButtons.

Question

How can I by clicking again on already selected RadioButton or by clicking anywhere on the screen, unclick this RadioButton so it can be unselected again. In general coming back to - three Options unselected and ready to choose.

Thank you

Upvotes: 0

Views: 142

Answers (1)

Alperen Kantarcı
Alperen Kantarcı

Reputation: 1098

You can do with button.setChecked(false); or group all of your buttons to RadioGroup then RadioGroup.clearCheck(); whenever you want.

Upvotes: 1

Related Questions