Contents

조회 수 992 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
441 Etc [doc] 웜 프레임워크 검증환경 구축(작성중..) file hooni 2013.04.23 16065
440 PPT [doc] 방송통신공학회 논문지(학술대회) file hooni 2013.04.23 13964
439 PPT [doc] 발표 자료 ㅎㅎtalk4neo file hooni 2013.04.23 21032
438 System/OS [doc] 레드햇 리눅스 메뉴얼 (html버전) file hooni 2013.04.23 10522
437 PPT [doc] 논문.. VoIP 관련.. ㅋㅋ file hooni 2013.04.23 17125
436 System/OS [doc] 네트워크 장비와 라우터 설정 방법 발표 자료 file hooni 2013.04.23 14566
435 Develop [doc] UI개발시 유용한 소프트웨어 (개발 및 디버깅 툴) hooni 2013.04.23 12936
434 System/OS [doc] TCP/IP 강의 자료 (html) file hooni 2013.04.23 11255
433 Develop [doc] mfc 매뉴얼 다운 받아서 완성하기.. ㅋㄷ file hooni 2013.04.23 7716
432 Develop [doc] Json Framework 설치와 사용 file hooni 2013.04.23 21962
431 Develop [doc] Equation Solving에 대한 발표자료.. file hooni 2013.04.23 7998
430 Develop [doc] C언어 문법 설명서 file hooni 2013.04.23 6472
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 98 Next
/ 98