title: How to un-check radio button without radio group?
body: <p>I have used the following code snippet to set one radio button to unchecked if the other is selected,but when I run the application and select both radio buttons the code doesn't work as both stay selected.</p>
  
  <p>I'm using a relative layout so I can't use any other solutions with a radio group,I'm just using two seperate radio buttons.</p>
  
  <p>Can someone point out where I could be going wrong somewhere as I can't see a flaw in the logic,any ideas?</p>
  
  <p>Anyways this is the solution I'm trying to implement but its not working in application:</p>
  
  <pre><code>public void onRadioButtonClicked(View view) {
          // Is the button now checked?
          boolean checked = ((RadioButton) view).isChecked();
  
          // Check which radio button was clicked
          switch(view.getId()) {
              case R.id.radBtnMM:
                  if (checked)
                      //set inch button to unchecked
                       radioInch.setChecked(false);
                  break;
              case R.id.radBtnInch:
                  if (checked)
                      //set MM button to unchecked
                      radioMM.setChecked(false);
                  break;
          }
      }
  </code></pre>