0

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()

2 Answers2

0

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

editText.text.toString()
0

in java and kotlin

editText.getText().toString() 

kotlin

editText.text.toString()
 
Niaj Mahmud
  • 399
  • 3
  • 10