https://kotlinlang.org logo
#android
Title
# android
g

gildor

06/20/2018, 9:32 AM
second snippet is equal to:
Copy code
textViewLogin = findViewById(R.id.button_login)
textViewLogin = textViewLogin.setOnClickListener {
   // Error, cannot assign Unit to TextView
}
Just check
setOnClickListener
signature, this method in java returns
void
which become
Unit
in Kotlin