I am trying to create a custom dialog box on the click of an option in the menu. I go on to start a new activity with the Intent pointing to customTextMessageDialog.
I
In your code you are setting the Activity's contentView to customDialog. You need to set the layout of your dialog to that layout. Read this.
Activity
customDialog
Do this:
dialog.setContentView(R.layout.customdialog);