I’m having some issue knowing where to put things ...
# android-architecture
a
I’m having some issue knowing where to put things in a MVVM architecture, I have a
RecyclerView
who’s content is provided by a
ViewModel
. But I want to add a binding to the elements of this
RecyclerView
that gets called when an element i clicked In my
Adapter
I have added a custom
ViewHolder
that adds a click listener to each element. My question is should I define the click method in the
ViewModel
and if so, how do I access it from the
ViewHolder
?