I want to display a dialog/popup window with a message to the user that shows \"Are you sure you want to delete this entry?\" with one button that says \'Delete\'. When
Simplest Solution For Kotln Developers
val alertDialogBuilder: AlertDialog.Builder = AlertDialog.Builder(requireContext())
alertDialogBuilder.setMessage(msg)
alertDialogBuilder.setCancelable(true)
alertDialogBuilder.setPositiveButton(
getString(android.R.string.ok)
) { dialog, _ ->
dialog.cancel()
}
val alertDialog: AlertDialog = alertDialogBuilder.create()
alertDialog.show()