Closed Gonzom closed 8 years ago
@Gonzom There are a couple of things that need to be fixed. This does not look like a problem in Recycler Core. I will change your code and update a working code as soon as I have some free time.
@InjectController(controller = ContactController.class, layout = R.layout.row_nested_floatfeed_user)
so the models are free to inherit from any class. Model <-> Controller
is a 1-1 mapping.
I see that you have two models that extend from same controller, we should not do that. Every model should have its own controller. As a workaround, you can create another model that extends the same model, so it will retain all the same methods and fields, and you can respective controllers and models for it.
@Gonzom Fixed your code. This should get you started. Archive.zip
So closing this issue. If this does not help you, feel free to open an issue again.
Hey,
I was requested to create a layout of a vertical RecyclerView with rows of nested horizontal RecyclerViews. Each nested row has a ContactModel in the first position. This class has several attributes, one of them is "type" which can be "user" or "group". A group has a different layout than a user.
The rest of the list are ActivityModel items.
I've created the models and controllers for each item, but I'm stuck on 2 fronts.
1) How to combine both items into 1 list - I could create a BaseItem and have both ContactModel and ActivityModel inherit from it. Would the controller know that a current item is an instance of one of the classes?
2) If 1 would work, how will I be able to change the layout of ContactModel depending on its type?
Would appreciate any assistance here.
Thanks,
I've attached class files Archive.zip