Ellen Spertus
02/01/2021, 10:07 PMrollButton.text = "Let's roll!"
rollButton.setOnClickListener {
Toast.makeText(this, "button clicked", Toast.LENGTH_SHORT).show()
}
I know the first line would be: rollButton.setText("Let's roll!"); in Java. Why doesn't the next statement become the following in Kotlin:
rollButton.onClickListener = ...;Ian Lake
02/01/2021, 10:15 PMgetText() to go with setText(), there's no getOnClickListener() so it isn't eligible to be converted into a propertyEllen Spertus
02/01/2021, 10:16 PM