[안드로이드] 다이얼로그(알림창) 띄우기
프로그래밍/안드로이드2016. 12. 17. 20:44
반응형
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | AlertDialog.Builder dialog = new AlertDialog.Builder(MainActivity.this); dialog.setTitle(getString("타이틀바 제목")); dialog.setMessage(getString("표시할 메세지")); dialog.setPositiveButton("YES", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // YES 선택시 처리할 내용 } }); dialog.setNegativeButton("NO", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // NO 선택시 처리할 내용 dialog.cancel(); } }); dialog.show(); | cs |
반응형
'프로그래밍 > 안드로이드' 카테고리의 다른 글
[안드로이드] adb shell, opendir failed, Permission denied 관련 (0) | 2016.12.24 |
---|---|
[안드로이드] String를 int로, int를 String로 바꾸는 방법 (0) | 2016.12.17 |
[안드로이드 추천앱] 현재 나의 GPS 위치, 좌표 확인하기 (0) | 2016.11.08 |
[안드로이드] 구글맵으로 현재위치 열기(위도,경도 기준) (0) | 2016.11.07 |
[안드로이드 추천앱] 손전등(FLASHLIGHT) 앱 추천!! (0) | 2016.10.29 |