Contents

조회 수 852 댓글 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 Develop [node.js] nodejs 기본 설치 hooni 2013.04.23 26256
440 Develop [node.js] 지금 하고 있는거.. file hooni 2013.04.23 26979
439 Develop [iphone] 파일 업로드 샘플 코드 ㅎㅎ secret hooni 2013.04.23 11120
438 Develop [js] JSON 컨트롤.. 재귀호출로 값 출력하기 hooni 2013.04.23 28640
437 Develop [js] 모바일웹에서 이미지 저장하는거 (context menu) 막기 hooni 2013.04.23 26370
436 Develop [android] keytool을 사용하여 키스토어 생성 hooni 2013.04.23 69515
435 Develop [js]모바일 웹에서 orientationchange hooni 2013.04.23 19360
434 System/OS 맥에서 파일공유 (윈도우,맥) file hooni 2013.04.25 37305
433 System/OS [mysql] mysql user 생성시 ERROR 1364 hooni 2013.04.25 28507
432 System/OS Mac OS X - Apache+PHP+MySQL 환경 서버 hooni 2013.04.25 31629
431 Etc 영어공부에 도움될만한 사이트 모음 hooni 2013.05.14 22632
430 Develop 서기의 PHP 동영상 강의(싱싱해) hooni 2013.05.15 30982
Board Pagination Prev 1 ... 57 58 59 60 61 62 63 64 65 66 ... 98 Next
/ 98