Skip to content Skip to sidebar Skip to footer

Kotlin Dialogfragment Edittext Editable Always Null

So, I'm using Kotlin extensions which is straightforward, but I can't get string from edittext here is my code: override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {

Solution 1:

So finally I figure it out — on Dialog Fragment view will always be null, because its never created, but it's created and added to dialog view which means I need to call:

dialog.group_edit_text.text.toString()

Instead of:

view.group_edit_text.text.toString()

Post a Comment for "Kotlin Dialogfragment Edittext Editable Always Null"