The error message is self-explanatory. You are trying to use a CompoundButton.OnCheckedChangeListener() in a place that takes a RadioGroup.OnCheckedChangeListener.
On Fri, Aug 12, 2011 at 12:58 AM, shamir shakir <[email protected]> wrote: > Hello, > I was trying to add the CheckedChangeListner for RadioGroup and it's not > working ... :( > I'm using eclipse IDE. And I'm getting this error > > The method setOnCheckedChangeListener(RadioGroup.OnCheckedChangeListener) >> in the type RadioGroup is not applicable for the arguments (new >> CompoundButton.OnCheckedChangeListener(){}) > > > Here's the code > > package com.dewsworld.android.practise; > > import java.util.Date; > > import android.app.Activity; > import android.content.Intent; > import android.content.res.Resources.Theme; > import android.graphics.drawable.GradientDrawable.Orientation; > import android.os.Bundle; > import android.os.Process; > import android.provider.ContactsContract; > import android.util.Log; > import android.view.View; > import android.view.View.OnClickListener; > import android.widget.AutoCompleteTextView; > import android.widget.Button; > import android.widget.CheckBox; > import android.widget.Checkable; > import android.widget.CompoundButton; > import android.widget.CompoundButton.OnCheckedChangeListener; > import android.widget.EditText; > import android.widget.Gallery; > import android.widget.LinearLayout; > import android.widget.ProgressBar; > import android.widget.QuickContactBadge; > import android.widget.RadioGroup; > import android.widget.TextView; > import android.widget.Toast; > import android.widget.ToggleButton; > import android.widget.SimpleAdapter.ViewBinder; > > public class EntryPointActivity extends Activity { > @Override > protected void onCreate(Bundle savedInstanceState) { > super.onCreate(savedInstanceState); > setContentView(R.layout.main) ; > RadioGroup radioGroup = (RadioGroup)this.findViewById(R.id.rg) ; > radioGroup.setOnCheckedChangeListener( new OnCheckedChangeListener() { > @Override > public void onCheckedChanged(RadioGroup group, int checkedId) { > // ... :( > } > }); > } > } > > > Any kind of help is much more appreciated. Thanks > > -- > > * Shamir Shakir* > L-2, T-2, Grad. Student, B. Sc., Dept. of CSE, > Military Institute of Science and Technology (MIST), > Mirpur Cantonment, Dhaka, Bangladesh. > > www.dewsworld.info | [email protected] > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 2.0 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

