I have the following code that builds a dialog and sets listeners on the views contained in the custom view within the dialog.