Android Studio – Kotlin issue while sum 2 variables
val btnAdd = findViewById<Button>(R.id.btnAdd) val btnSub = findViewById<Button>(R.id.btnSub) btnAdd.setOnClickListener { val tx1 = findViewById<TextInputEditText>(R.id.tx1).toString().toInt() val tx2 = findViewById<TextInputEditText>(R.id.tx2).toString().toInt() var result = findViewById<TextView>(R.id.result) result.text = (tx1 + tx2).toString() } I want to sum tx1 and tx2 but i get this message…