setContentView for alertDialog

working on a dialog to pop up that inside if it has two textEdit’s. I would like to get the information from the text edits on submit, but dont know how. I also dont know how to do a submit or a cancel button for a plain dialog ( i know you can on an alertDialog with “setNegativeButton”).

So how do I add a submit or cancel to a regular dialog? this is what I am working with thus far:

public void changeEmail(View v){

    Dialog dialog =  new Dialog(this);
    dialog.setTitle("Enter your new email");;


I guess also I was wondering if someone could quickly explain how I would get the info from the two textEdits that are inside of the layout that the dialog is using?