목록AlertDialog (1)
코린이 탈출기
AlertDialog - 경고 대화 상자로 내용을 삭제하는 등의 변경이 있을 경우에 한 번 더 확인하는 기능입니다. 변경을 바로 해도 상관은 없을 경우가 아닌 중요한 내용을 변경할 경우 사용하는 기능입니다. 코드를 먼저 보여드린 후 설명하겠습니다. (내용을 삭제하는 경우를 예를 들어 보겠습니다.) val alert = AlertDialog.Builder(this) alert.setTitle("삭제") .setMessage("삭제하시겠습니까?") .setPositiveButton("삭제") {dialog, which -> 삭제할 내용.removeAt(position) 어댑터.notifyDataSetChanged()} .setNegativeButton("취소",null) .show() AlertDialog를..
안드로이드/안드로이드
2021. 8. 5. 15:16