1

The RecyclerView is already created, just the list of songs (name and artist) (LinearLayout). I have to add the sections, so that the songs can be assigned to a section.

I already have the SongsAdapter, which uses my song_layout in onCreateViewHolder function.

What i tried: I created the separate layout for Sections (section_layout) and implemented the SectionsAdapter.

My question is, is that the right way to go, having separate adapters? If so, then how do I pass the SongsAdapter into the SectionsAdapter, so that the Song is presented as a Section's child?

kozzzza
  • 31
  • 3
  • You want to implement multiple view type in this case. Which is already been discussed number of times. Please do some research. This can be helpful: https://stackoverflow.com/questions/26245139/how-to-create-recyclerview-with-multiple-view-type – skafle Jun 18 '21 at 15:30

0 Answers0