4
Làm thế nào để thêm hộp tin nhắn với nút 'OK'?
Tôi muốn hiển thị một hộp thông báo có nút OK. Tôi đã sử dụng mã sau nhưng nó dẫn đến lỗi biên dịch với đối số: AlertDialog.Builder dlgAlert = new AlertDialog.Builder(this); dlgAlert.setMessage("This is an alert with no consequence"); dlgAlert.setTitle("App Title"); dlgAlert.setPositiveButton("OK", null); dlgAlert.setCancelable(true); dlgAlert.create().show(); Tôi nên làm như thế …