I have created a custom dialog, And I have inserted two buttons, one is called send, and the other cancel.
I would like to know hot to close down the dialog when pressing cancel?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you using the AlertDialog.Builder? There are lots of way of implementing a custom Dialog but assuming your “Send” button is a positive or neutral button and your “Cancel” button is a negative button you can always do this.
You can also call dialog.cancel() if you want to invoke the DialogInterface.OnCancelListener.
If this is not the case you need to supply additional information.