I'm going to create a dialog with the delete button printed on it, "Are you sure you want to delete this?"
If you press the delete button, the data will be deleted, and if you don't, nothing will happen, but I made this button click listener, but I can't add it to the dialog... What do I do?
android android-dialog
new AlertDialog.Builder(context)
.setTitle("Delete entry")
.setMessage ("Are you sure you want to delete this?")
.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Click this button to proceed with deletion
}
})
.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// Nothing's happening
}
})
.setIcon(android.R.drawable.ic_dialog_alert)
.show();
Try applying this.
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
581 PHP ssh2_scp_send fails to send files as intended
617 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.