Trying to get if click on one radion button the other is unclicked
<p>I am trying to find how if you click on one radio button the other is unclicked using java not XML.  I have both of my radioButtons in a tableRow.  When I put them in a radioGroup is messes up the rest of my XML layout.  Basically,if one is clicked make sure the other in not clicked.</p>

<pre><code>public void drivable(View v) {
    if (notDrivable.isChecked()) {
        notDrivable.toggle();
    }

}
public void notDrivable(View v) {
    if (drivable.isPressed()) {
        drivable.toggle();
    }
}
</code></pre>

<p>I figured it out.  I needed to change it from toggle() to notDrivable.setChecked(false);  Here is the code that works.</p>

<pre><code>public void drivable(View v) {
    if (notDrivable.isChecked()) {
        notDrivable.setChecked(false);
    }

}
public void notDrivable(View v) {
    if (drivable.isChecked()) {
        drivable.setChecked(false);
    }
}
</code></pre>
