editText get text kotlin

This is Kotlin, not java. You do not need to get the id of it. In kotlin, just write:

var editTextHello = editTextHello.text.toString()

use the beauty of kotlin 😉

P.s: BTW, better to choose xml IDs like edx_hello and for the kotlin part, var editTextHello. Then you can differentiate between xml vars and kotlin vars.

Leave a Comment