title: RadioGroup onCheckedChanged function won't fire
body: <p>My app keeps track of restaurant servers' shift sales to help them budget. In the activity that displays past shifts, I've created a RadioGroup under the ListView so the user can choose to display lunch, dinner, or both. </p>
  
  <p>I've implemented in the activity RadioGroup.onCheckedChangeListener, but onCheckedChanged never gets called. I also tried using an anonymous inner class as listener, same result.</p>
  
  <p>I tried to copy/modify code from this answer: <a href="https://stackoverflow.com/a/9595528">https://stackoverflow.com/a/9595528</a> ...but when I added the <code>@Override</code> to the callback function, the Eclipse compiler gave me an error (not warning) that the method must override a superclass, and the quick fix was to remove the override.</p>
  
  <p>I'm pretty sure the signatures are match, as they were made with Eclipse's autocomplete and implement methods facilities. I then followed instructions to move my java compiler from 1.5 to 1.6, and none of the above listed behavior seemed to change.</p>
  
  <p>Here's the code I think is relevant:</p>
  
  <pre><code>public class DataActivity extends ListActivity implements OnCheckedChangeListener{
      RadioButton rbBoth;
      RadioButton rbDinnerOnly;
      RadioButton rbLunchOnly;
  
      @Override
      public void onCreate(Bundle savedInstanceState){
          super.onCreate(savedInstanceState);
          setContentView(R.layout.database);
          // ...
          final RadioGroup rgGroup = (RadioGroup)findViewById(R.id.DataRadioGroup);
          rbBoth = (RadioButton)findViewById(R.id.RadioBoth);
          rbDinnerOnly = (RadioButton)findViewById(R.id.RadioDinnerOnly);
          rbLunchOnly = (RadioButton)findViewById(R.id.RadioLunchOnly);
          rgGroup.setOnCheckedChangeListener(this);
          populateAllShifts();
      }
  
      // ...
  
      public void onCheckedChanged(RadioGroup group, int checkedId) {
          rbLunchOnly.setText("Click!");
          Toast.makeText(getApplicationContext(), "Lunch Only", Toast.LENGTH_LONG).show();
          if(group.getCheckedRadioButtonId() == R.id.RadioBoth){
              populateAllShifts();
              return;
          }
          if(group.getCheckedRadioButtonId() == R.id.RadioLunchOnly){
              populatLunchShifts();
              return;
          }
          if(group.getCheckedRadioButtonId() == R.id.RadioDinnerOnly){
              populateDinnerShifts();
              return;
          }
      }
  
      // ...
  
  }
  </code></pre>
  
  <p>There is a ListView in this class with a custom adapter, but if my understanding and my XML are correct, the RadioGroup should be outside of the list:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/llDataLayout"
      android:weightSum="5"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" android:orientation="vertical"&gt;
  
      &lt;ListView android:layout_weight="4"
          android:layout_width="fill_parent"
          android:id="@android:id/list"
          android:layout_height="wrap_content"&gt;
      &lt;/ListView&gt;
  
      &lt;RadioGroup 
          android:layout_weight="1"
          android:id="@+id/DataRadioGroup"
          android:orientation="horizontal"
          android:layout_height="wrap_content"
          android:layout_width="fill_parent"&gt;
  
          &lt;RadioButton android:text="Lunch and Dinner"
              android:textSize="10dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/RadioBoth"/&gt;
          &lt;RadioButton android:text="Dinner Only"
              android:textSize="10dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/RadioDinnerOnly"/&gt;
          &lt;RadioButton android:text="Lunch Only"
              android:textSize="10dp"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:id="@+id/RadioLunchOnly"/&gt;
  
      &lt;/RadioGroup&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Any ideas out there?</p>