public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.order);
mDataList = new ArrayList<String>();
mButton[0] = (RadioButton) findViewById(R.id.numButton1);
mButton[1] = (RadioButton) findViewById(R.id.numButton2);
mButton[2] = (RadioButton) findViewById(R.id.numButton3);
mButton[3] = (RadioButton) findViewById(R.id.numButton4);
mButton[4] = (RadioButton) findViewById(R.id.numButton5);
mButton[5] = (RadioButton) findViewById(R.id.numButton6);
mButton[6] = (RadioButton) findViewById(R.id.numButton7);
mButton[7] = (RadioButton) findViewById(R.id.numButton8);
mButton[8] = (RadioButton) findViewById(R.id.numButton9);
mButton[9] = (RadioButton) findViewById(R.id.numButton10);
mButton[10] = (RadioButton) findViewById(R.id.numButton11);
mButton[11] = (RadioButton) findViewById(R.id.numButton12);
mButton[12] = (RadioButton) findViewById(R.id.numButton13);
mButton[13] = (RadioButton) findViewById(R.id.numButton14);
mButton[14] = (RadioButton) findViewById(R.id.numButton15);
mButton[15] = (RadioButton) findViewById(R.id.numButton16);
mButton[16] = (RadioButton) findViewById(R.id.numButton17);
mButton[17] = (RadioButton) findViewById(R.id.numButton18);
mButton[18] = (RadioButton) findViewById(R.id.numButton19);
mButton[19] = (RadioButton) findViewById(R.id.numButton20);
// 버튼들에 대한 클릭리스너 등록 및 각 버튼이 클릭되었을 때 출력될 메시지 생성(리스트)
for(int i = 0 ; i < 20 ; i++)
{
//mButton[i].setFocusable(false);
mButton[i].setOnClickListener(this); // 클릭 리스너 등록
}
public void onClick(View v){ // 버튼 클릭 이벤트
final RadioButton newButton = (RadioButton) v;
Button orderButton = (Button)findViewById(R.id.button1);
orderButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
newButton.setText(phoneAddress());
}
});
단순 버튼으로 만들었을땐 제대로 뿌려졌는데
라디오버튼으로 바꾸고 나선 버튼에 텍스트가 안뿌려지네요..;;
implements 나 onClick() 의 문제인가요?