title: Click twice to check Radio Button?
body: <p>I am trying to build a test application and I am using Radio buttons for the choices A,B,C,D. I am trying to calculate the result -> for example when press A increment 1, when press B increment 2 and so on. I was using Radio Group at first but I understood that if the user try to change the answer to his question from A to B the incremented result will be 3, not 2 as expected. So I switched to Radio Buttons and I try the following code:</p>
  
  <pre><code>      rb1.setOnCheckedChangeListener(new 
           android.widget.CompoundButton.OnCheckedChangeListener (){ 
  
          @Override
          public void onCheckedChanged(CompoundButton buttonView,
                  boolean isChecked) {
              i++;
              if(rb2.isChecked())
              { 
                  i--;
                  rb2.setChecked(false);                  
              }
  
          }
              });
  
      rb2.setOnCheckedChangeListener(new android.widget.CompoundButton.OnCheckedChangeListener (){
  
  
          @Override
          public void onCheckedChanged(CompoundButton buttonView,
                  boolean isChecked) {
              i++;
  
              if(rb1.isChecked())
              { 
                  i--;
                  rb2.setChecked(false);                          
              }
          }
              });
  </code></pre>
  
  <p>And now the second Radio Button have to be clicked twice in order to be checked. Is this a bug and could it be fixed. I need the Buttons to change state after the first click. All ideas and advice will be welcomed. Thank you.</p>