I was generating an action by clicking on a Button
fun cliqueBotao(view : View){
var texto = findViewById<>(R.id.textoExibicao) as TextView
texto.setText("Texto alterado")
}
Only Android Studio complained that findViewById<>
is without parameter. I did a quick search and noticed that some methods put the value passed by parameter when the method is created fun cliqueBotao(view : View)
within findViewById<>
And my method stayed like this
fun cliqueBotao(view : View){
var texto = findViewById<View>(R.id.textoExibicao) as TextView
texto.setText("Texto alterado")
}
So far my App is working normal, why before did not need and now needs and this form is correct?
Thank you in advance