setOnClickListener first time

is the view of view: View -> just a dummy variable -or- is the argument view a global view reference to the MainActivity activity?

Hi TopCat
are you talking about a specific part of the first lesson (which part??)

i didn’t understand what you mean, can you explain more??

fakhour,

On page 28 the example code:

V

trueButton.setOnClickListner { view: View ->

Toast.makeText { …

In the text:

The Context parameter is typically an instance of Activity (and Activity is a subclass of Context). Here you pass the instance of MainActivity as the Context argument.

Where is the argument ‘view’ created? I’m assuming it is an IN val not an OUT.

Thank you, TopCat

In this lambda function (the function between the curly braces) view is the trueButton, not a global variable