I can’t get a binding expression to work on a val property in an Object.
<data>
<import type="letstwinkle.com.twinkle.User" />
</data>
<ImageView
android:id="@+id/userAvatar"
app:layout_widthPercent="18%"
app:layout_aspectRatio="100%"
android:layout_alignParentStart="true"
bind:srcUri="@{User.profile.photos[0].fullSource}"
/>
where User is this
object User {
val profile: UserProfile by lazy {
...
}
val account: Account? = Account()
}
but I can’t resolve the error "Error:(26, 28) Could not find accessor letstwinkle.com.twinkle.User.profile "
I have also tried ‘User.getProfile()’. Any tips?