RecyclerView with sections and Firebase data

2

Hi, I'm working on an app, in it I have to fill a recyclerview with Firebase data, which I managed to do with the adapter and information that firebase itself provides . Now what I want to do is fill a recyclerview with the firebase data but it has sections which would be the parent that hosts the data in firebase, I'm a little lost with this, and I think it's in the Recyclerview adapter where I do not know how do it, I hope you can help me.

Here is an image of what I want to do:

    
asked by Latm 31.03.2016 в 06:05
source

1 answer

1

The adapter included in the Firebase UI library is designed to handle a type of data. It takes care of serialization synchronization and adding it to the adapter.

Handling 2 different data levels (in your case, title and section) in the same adapter is not impossible, but requires an extensive modification of the adapter and the firebase UI is already quite complex in itself.

It is not a typical pattern for the design in Android to have 2 hierarchical levels in the same list, I would recommend that you use any of the strategies in the link (tabs is the most common). If you are determined to do so in a list format, I recommend using an "accordion" such as the one that implements this library .

    
answered by 02.08.2016 в 17:37