I want to build a recyclerView that will display Object of different types but the views are the same. Here's the class.
{
results: {
clothing_items: [
{
id: 422,
created_at: "2020-01-20 11:23:10 -0500",
image: "",
last_event_date: null,
name: "desk",
thumbnail: "",
type_of: "accessories"
}
],
events: [
{
id: 157,
date: "2020-01-14 09:53:00 -0500",
image: null,
name: ""
}
],
looks: [
],
tags: [
{
id: 97,
created_at: "2020-01-20 10:46:12 -0500",
title: "greatest person"
}
]
}
}
The recycler view will contact all the ClothingItem, Event, Look, Tag. This response comes from global search. How to build the adapter? Should I use multiple adapter?