Home > Blockchain >  take data from edit text in kotlin
take data from edit text in kotlin

Time:02-14

I have some edittext boxes (input type = phone) in a fragment. I need to get the value from them and store them in a variable called totalincome and pass this value to another fragment which has a textview. how to do this in the kotlin way. I'm a beginner.

is this the right way etincome.toString().toInt()

CodePudding user response:

if input type you have phone , data type the variable must string

editText.text.toString()

CodePudding user response:

in java and kotlin

editText.getText().toString() 

kotlin

editText.text.toString()
 
  • Related