Develop
2015.07.09 10:04
[android] AlertDialog 메시지 창 띄우기
조회 수 855 댓글 0
메세지를 띄우고 [확인] 버튼만 적용할 경우
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
-
[node.js] nodejs 기본 설치
-
[node.js] 지금 하고 있는거..
-
[iphone] 파일 업로드 샘플 코드 ㅎㅎ
-
[js] JSON 컨트롤.. 재귀호출로 값 출력하기
-
[js] 모바일웹에서 이미지 저장하는거 (context menu) 막기
-
[android] keytool을 사용하여 키스토어 생성
-
[js]모바일 웹에서 orientationchange
-
맥에서 파일공유 (윈도우,맥)
-
[mysql] mysql user 생성시 ERROR 1364
-
Mac OS X - Apache+PHP+MySQL 환경 서버
-
영어공부에 도움될만한 사이트 모음
-
서기의 PHP 동영상 강의(싱싱해)