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.setCo
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:
Dialog myDialog = new Dialog(Overview.this);
View view = LayoutInflater.from(context).inflate(R.layout.dialog_change,null);
myDialog.setContentView(view);
myDialog.setTitle("My Custom Dialog Title");
Button button1 = (Button)view.findViewById(R.id.button1);
button1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v){
dialog.dismiss();
}
});
//Similarly for the second button
myDialog.show();