<@U0BTGLSE8>: this sounds wrong. `this@something` ...
# android
k
@danijoo: this sounds wrong.
this@something
either refers to an enclosing class' instance, like in Java's inner classes you sometimes use
OuterClass.this
or to a receiver parameter of an extension method, e.g.
fun Foo.bar() = this@bar
is equivalent to
fun Foo.bar() = this
and will return the receiver parameter. In anko you have a lot of nested anonymous extension methods to make it looks like a DSL and if you need to refer the property of a receiver of an outer extension method that is maybe shadowed by an inner receiver (both of type
View
) you need to qualify it with
this@theCorrectExtensionMethod.property
to access it.