2.3.3
Compose List & RecyclerView Item Child improvements in #60
- ComposeListItem child
old syntax:
class CustomListItem : UltronComposeListItem() {
val status by lazy { getChild(hasTestTag(contactStatusTestTag)) }
}
new:
class CustomListItem : UltronComposeListItem() {
val name by child { hasTestTag(contactNameTestTag) }
}
You can use both ways at the same time:
class CustomListItem : UltronComposeListItem() {
val name by child { hasTestTag(contactNameTestTag) }
val status by lazy { getChild(hasTestTag(contactStatusTestTag)) }
}
- RecyclerViewItem child
Old syntax:
class CustomRecyclerItem : UltronRecyclerViewItem() {
val name by lazy { getChild(withId(R.id.tv_name)) }
}
New:
class CustomRecyclerItem : UltronRecyclerViewItem() {
val name by child { withId(R.id.tv_name) }
}
You can use both ways at the same time:
class CustomRecyclerItem : UltronRecyclerViewItem() {
val name by child { withId(R.id.tv_name) }
val status by lazy { getChild(withId(R.id.tv_status)) }
}
Full Changelog: 2.3.2...2.3.3