Android
안드로이드 리스트 알림창 List AlertDialog 띄우기
dreamjy
2015. 2. 8. 00:47
안드로이드에서 리스트 알림창 List AlertDialog를 띄우는 방법에 대해 포스팅합니다.
Summary
Public Constructors
AlertDialog.Builder(Context context)
AlertDialog.Builder(Context context, int theme)
스타일을 지정하여 생성할 수 있습니다.
Public Constructors | ||
| AlertDialog.Builder(Context context) | |
| AlertDialog.Builder(Context context, int theme) |
- 실행화면
- 코드
final String[] items = { "One", "Two", "Three" }; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Title"); builder.setItems(items, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { if (which == 0) { } else if (which == 1) { } } }); builder.create(); builder.show(); |
참고 사이트 : developer.android.com
궁금한 사항이나 수정은 댓글로 남겨주세요~