|
在监听运行时,模拟器就提示has stop unexpectedly package My.Test06;
import android.app.Activity;
import android.os.Bundle;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.RadioGroup.OnCheckedChangeListener;
import android.widget.Toast;
public class Test06Activity extends Activity {
private RadioGroup radioGrounp = null;
private RadioButton femaleRadioButton = null;
private RadioButton maleRadiobutton = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
System.out.println("test01");
radioGrounp = (RadioGroup)findViewById(R.id.maleRadioButton);
femaleRadioButton = (RadioButton)findViewById(R.id.femaleRadioButton);
maleRadiobutton = (RadioButton)findViewById(R.id.maleRadioButton);
System.out.println("test02");
radioGrounp.setOnCheckedChangeListener(new radioGropOnCheckedChangeListener());
}
class radioGropOnCheckedChangeListener implements OnCheckedChangeListener{
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
// TODO Auto-generated method stub
}
}
}
复制代码 |
|