Created
June 5, 2023 19:50
-
-
Save 5AbhishekSaxena/fa9c52d47f597099dd1410990a6f2c52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun buildSimpleDialog(): AlertDialog { | |
return MaterialAlertDialogBuilder(this) | |
.setTitle("Delete Task") | |
.setPositiveButton( | |
"Delete" | |
) { _, _ -> Toast.makeText(this, "Delete clicked", Toast.LENGTH_SHORT).show() } | |
.setNegativeButton( | |
"Cancel" | |
) { _, _ -> Toast.makeText(this, "Cancel clicked", Toast.LENGTH_SHORT).show() } | |
.setCancelable(true) | |
.setMessage("Are you sure that you would like to delete the task?") | |
.setIcon(R.drawable.ic_baseline_delete_24) | |
.create() | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment