<@U2WNHKJPJ> you can "avoid" that itemView with `w...
# android
v
@joe_androidsecurity you can "avoid" that itemView with
with
, example:
Copy code
class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
    fun bind(item: Item) = with(itemView) {
        itemTitle.text = item.title
        itemSubtitle.text = item.subtitle
    }
}
👍 3
j
Is it okay if I nest With's? 🙂 Would it be too ugly? Would it impact performance? As I already have one with
p
This is amazing thank you