Following is the code for creating custom view dialog with kotlin.
Following is the dialog layout file
creating dialog and updating the text in the text view
val dialog = Dialog(activity!!)
dialog.setContentView(R.layout.my_dialog_layout)
dialog.tvTitle.text = "Hello World!!"
dialog.show()