Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid radiobutton check after clearing check issue
    text
    copied!<p>friends. I'm having a really silly problem with radiogroup. Yet I'm unable to find solution.</p> <p>I will try to describe how to reproduce my problem: I have radiobutton group and two buttons inside. I select one of them, lets say 1st one. Then I'm clearing selection by calling <em>radioGroup.clearCheck()</em> After I'm trying to select 1st button, but its not checking. If I check 2nd, it checks normally. If I check 1st after checking 2nd it also works normally.</p> <p>This may sound crazy, yet I can't fix it. Please help me, thanks in advance.</p> <p>I use </p> <pre><code>@Override protected void init() { View view = View .inflate(getContext(), R.layout.wo_task_yn_result, null); performed = (RadioButton) view.findViewById(R.id.yn_yes); notPerformed = (RadioButton) view.findViewById(R.id.yn_no); radioGroup = (RadioGroup) view.findViewById(R.id.yn_options); performed.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) { Log.d(YES, "verify"); if (isChecked) { Log.d(YES, "checked"); result = YES; } } }); notPerformed.setOnCheckedChangeListener(new OnCheckedChangeListener() { @Override public void onCheckedChanged(final CompoundButton buttonView, final boolean isChecked) { Log.d(NO, "verify"); if (isChecked) { Log.d(NO, "checked"); result = NO; } } }); addView(view); } </code></pre> <p>To create buttons and </p> <pre><code>@Override public void clear() { radioGroup.clearCheck(); result = ""; } </code></pre> <p>for clearing them</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload