Reputation:
Why is Android using $
sign to reference nested class, instead of standard .
sign. As far as I know, in Java $
is related to inner class context (in stacktrace).
<view class="path.to.Outer$Nested" ... />
In data-binding .
sign is being used to reference nested class as expected:
<variable name="..." type="path.to.Outer.Nested" />
Upvotes: 0
Views: 480
Reputation: 12477
Because the inner class is not static.
class Parent {
class Child {
}
}
would result in Parent$Child
while
class Parent {
static class Child {
}
}
would be referenced as Parent.Child
.
Upvotes: 1