What is the correct code for Settext in Kotlin?

-2

Code:

num7.setOnClickListener 
{var value1: String = value.text.toString()

val i = value1.toInt()

val dis = 7 + i*10

Toast.makeText(this,"7",LENGTH_SHORT ).show()

value.setText(dis)

Error:

2020-01-04 16:02:43.061 3156-3156/com.example.calculator127159 W/ResourceType: No package identifier when getting value for resource number 0x00000007
2020-01-04 16:02:43.061 3156-3156/com.example.calculator127159 D/AndroidRuntime: Shutting down VM
2020-01-04 16:02:43.064 3156-3156/com.example.calculator127159 E/AndroidRuntime: FATAL EXCEPTION: main
kotlin
text
asked on Stack Overflow Jan 4, 2020 by Rahul Katiyar • edited Jan 4, 2020 by halfer

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0