I want to create a custom dialog. So i create a template 'dialog_change' and I open the dialog.
Dialog myDialog = new Dialog(Overview.this);
myDialog.setContentView(R.layout.dialog_change);
myDialog.setTitle("My Custom Dialog Title");
myDialog.show();
Now i want to add two button (one positive and one negative button), at the bottom. How can i do that?
I'd just make your own custom class to simulate an AlertDialog, this way you can use your own layout with no strings attached. (There are some weird issues where you can't fully get rid of the frame if you want a fully styled AlertDialog). Something like this, but you can expand this as fully as you want:
You can add the two buttons to the custom layout that you are using for dialog(i.e. dialog_change). And then you can access them after creating the dialog as follows: