I followed a tutorial to add buttons to a dialog, sorry, forgot the link, here is my code to display a dialog:
final Dialog dialog = new Dialog(MainActivity.this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.about);
dialog.setCancelable(true);
Button buttonEmail = (Button) dialog.findViewById(R.id.aboutQuit);
buttonEmail.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
String inURL = "mailto:my@email.com";
openWebURL(inURL);
}
});
Button buttonQuit = (Button) dialog.findViewById(R.id.aboutQuit);
buttonQuit.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
dialog.dismiss();
}
});
And it works, it display the dialog and all but it will only set one of the buttons, depending in what order I put them, how can I fix this, thanks for your time 'n' help, zeokila ;)