Notice
Recent Posts
Recent Comments
반응형
목록2011/11/16 (2)
오늘도 공부
RadioButton group(그룹)으로 사용하기
잘안쓰지만 언젠가는 사용할일이 있겠지 싶은 물건. 주의할점이라고 하면 RadioGroup , RadioButton은 직계 부모 자식 간이어야 합니다. 먼저 그룹값을 가져온뒤 RadioGroup sexGroup = (RadioGroup) findViewById(R.id.sex); 그중에 선택퇸 라디오버튼을 다시한번 가져와서 RadioButton sex = (RadioButton) findViewById(sexGroup.getCheckedRadioButtonId()); 그것의 라벨내용을 사용합니다. sex.getText().toString();
Android
2011. 11. 16. 15:36
