In `constructor(ctx: Context) : super(ctx)`, what'...
# getting-started
d
In
constructor(ctx: Context) : super(ctx)
, what's happening is that when you call
MyView(someContext)
in order to instantiate the class, the constructor also needs to first call it's superclass's constructor (
View
) - that's what the
: super(ctx)
is doing. It sets up the superclass before it sets up itself.