Android Set Title of DialogFragment

April 21, 2019
dialog.setTitle("Title")
class CustomDialog: DialogFragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {

        dialog?.setTitle("Custom Dialog")
        // return super.onCreateView(inflater, container, savedInstanceState)
        return activity!!.layoutInflater.inflate(R.layout.customdialog, container)
    }

}
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.