In Android, can I change the title of a dialog box at Runtime?
AlertDialog.Builder builder;
builder = new AlertDialog.Builder(Manage_Holidays.this);
builder.setMessage("Are you sure you want to insert new holiday")
.setCancelable(false)
.setTitle("Confirmation")
.setNegativeButton("No",new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dialog,int id) {
// Title need to changed ass progress }})
.setPositiveButton("Yes",new DialogInterface.OnClickListener() {
public void onClick( DialogInterface dialog,int id) {
builder.setMessage("Processing...");
builder.setTitle("dsjc");
}}).setCancelable(false);
AlertDialog alert = builder.create();
alert.show();
In this, I thought to display a string on clicking yes button and another string for no button..=