You have made numerous errors, make sure to check the id of the button is actually 10, most people that are fairly new to dialogs also make that error.