I haven’t run into related issues yet but definitely appreciate your heads up!
g
Geert
04/11/2019, 10:15 AM
I am showing ViewModels in a RecyclerView, is it a good usecase to use inline classes with the ViewModel as parameter, and an interface with the method getLayouResId() for specifying the layout resource id? So that the RecyclerViewAdapter automatically can bind the viewmodel with layout to a viewholder?
Geert
04/11/2019, 10:23 AM
Hmm, never mind. Cant extend ViewModel
Geert
04/11/2019, 11:29 AM
Wait, I think I found a solution for this.
Geert
04/11/2019, 11:34 AM
But sinceI use IntViewModel as class, I probably can just add the layoutResId also in there. So no need for inline classes, right?