Ryan Pierce
10/15/2020, 1:19 AMonItemClick actually get inlined? I inlined it with the intention to improve performance, but I haven't seen inline used in a constructor before.
class MyAdapter(private inline val onItemClick: (Item) -> Unit) {
//...
}Marc Knaup
10/15/2020, 1:22 AMMarc Knaup
10/15/2020, 1:23 AMRyan Pierce
10/15/2020, 1:27 AMMyAdapter is an androidx RecyclerView adapter using dataBinding. onItemClick is the function executed when a row is clicked. I'm playing around with different ways to pass an onClick function to the ViewHolder.Marc Knaup
10/15/2020, 1:39 AMRyan Pierce
10/15/2020, 1:48 AM