HOW TO SHOW ALERT DIALOGUE IN ANDROID APP
YOUTUBE VIDEO CODE
AlertDialog.Builder alert = new AlertDialog.Builder(MainActivity.this);
alert.setTitle(title);
alert.setMessage(message);
alert.setPositiveButton("YES", (dialog, which) -> {
Toast.makeText(this, "Record Deleted Successfully", Toast.LENGTH_SHORT).show();
});
alert.setNegativeButton("NO", null);
alert.setNeutralButton("CANCEL",null);
alert.create();
alert.setCancelable(false);
alert.show();
}
No comments:
Post a Comment