조회 수 980 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
메세지를 띄우고 [확인] 버튼만 적용할 경우
AlertDialog.Builder alert = new AlertDialog.Builder(MyActivity.this);
alert.setPositiveButton("확인", new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
    dialog.dismiss();     //닫기
    }
});
alert.setMessage("테스트 메세지");
alert.show();

메세지를 띄우고 [확인], [취소] 버튼으로 적용할 경우
AlertDialog.Builder alert_confirm = new AlertDialog.Builder(MyActivity.this);

alert_confirm.setMessage("Yes or No?").setCancelable(false).setPositiveButton("YES",
new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
        // 'YES'
    }
}).setNegativeButton("NO",
new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
        // 'No'
    return;
    }
});
AlertDialog alert = alert_confirm.create();
alert.show();


[출처] http://shstarkr.tistory.com/144

?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
197 Develop [c++] 퍼즐 버블버블 간단한 원리(사용공식) file hooni 2013.04.23 9992
196 Develop [c++] 트리컨트롤 예제1 ㅋㅋ file hooni 2013.04.23 7190
195 Develop [c++] 트리컨트롤 스텝 3 예제.. file hooni 2013.04.23 7961
194 Develop [c++] 트리컨트롤 스텝 2 예제.. file hooni 2013.04.23 6972
193 Develop [c++] 템플릿(Template) 예제 소스.. file hooni 2013.04.23 6997
192 Develop [c++] 초간단 스택 두 가지 방식(class, struct) file hooni 2013.04.23 7628
191 Develop [c++] 채팅로봇 소스.. ㅋㄷㅋㄷ file hooni 2013.04.23 8902
190 Develop [c++] 중복실행 방지(Mutex;뮤텍스 ) 샘플 소스.. ㅋㅋ file hooni 2013.04.23 8762
189 Develop [c++] 자료구조(링크리스트,스택,큐)와 후위 표기 계산기 샘플 ㅋㅋ 4 file hooni 2013.04.23 12350
188 Develop [c++] 인라인 함수에 대한 설명 hooni 2013.04.23 7127
187 Develop [c++] 인라인 함수 설명과 예제.. file hooni 2013.04.23 6668
186 Develop [c++] 윈도우 프로세스뷰어 분석.. ㅋㅋ file hooni 2013.04.23 8861
185 Develop [c++] 윈도우 API 정복 예제 file hooni 2013.04.23 7633
184 Develop [c++] 웹폼(webform)전송과 http 파일 업로드 샘플 file hooni 2013.04.23 33109
183 Develop [c++] 압축프로그램(Lite Zip) 샘플 file hooni 2013.04.23 8629
182 Develop [c++] 쓰레드(Thread) 객체의 사용 hooni 2013.04.23 8604
Board Pagination Prev 1 ... 60 61 62 63 64 ... 74 Next
/ 74