Android Radio Button doesn't get checked sometimes
-
26-09-2019 - |
문제
I have 4 RadioButton
s in a RadioGroup
. The RadioButton
s have the same instance of OnCheckedChangedListener
set. When any of the RadioButton
is selected a dialog is popped up after 800ms using a handler. The problem is, sometimes any of the RadioButton
s remains unchecked even after the checked state is changed, but the dialog pops up. I suspect this to be a bug. Any pointers will be greatly appreciated.
해결책
Instead of calling RadioButton.setChecked()
for every individual instance I called RadioGroup.clearChecked()
, this seemed to solve my problem.
제휴하지 않습니다 StackOverflow