AlertDialog not showing two buttons.
- by jfalexvijay
Hi
AlertDialog not showing send button. Below is the code. Please tell me what mistake I have made in my code.
protected Dialog onCreateDialog(int id) {
final AlertDialog.Builder dialog = new AlertDialog.Builder(this);
dialog.setMessage("Enter Holla message");
EditText hollaMessage = new EditText(this);
dialog.setView(hollaMessage);
dialog.setCancelable(false);
dialog.setPositiveButton("Send", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
List result = new ArrayList();
}
});
dialog.setPositiveButton("Cancel", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dismissDialog(0);
}
});
AlertDialog alert = dialog.create();
return alert;
}