How can i use the multiple ViewHolders not inside the Recycler Adapter class but in saperate files. I also want the bind methods to be inside the ViewHolder classes. My question is how to move the bind function inside the VIewHolder along with the itemCallback interface
Asked
Active
Viewed 90 times
0
-
`getItemViewType`? – EpicPandaForce Nov 19 '19 at 12:12
-
https://stackoverflow.com/a/29697571/2235972 – denvercoder9 Nov 19 '19 at 12:14
-
Your `ViewHolder` classes don't have to be nested in the `Adapter`. What problems are you having in moving them to separate files? – Mike M. Nov 19 '19 at 12:14
-
1Possible duplicate of [How to create RecyclerView with multiple view type?](https://stackoverflow.com/questions/26245139/how-to-create-recyclerview-with-multiple-view-type) multiple solutions here that OP is looking for – denvercoder9 Nov 19 '19 at 12:15
-
Here is step by step article on that "https://www.journaldev.com/12372/android-recyclerview-example" – Pritesh Vishwakarma Nov 19 '19 at 12:25