0

I want to use Multi Type in Paging3,but PagingDataAdapter only suport one generic paradigm. How to do it?Maybe there is some demo?

And I want to use it with Room.

Like in a RecylerView , there are two kinds of item.One is text content,another is image.

So I want to know how to do it?

a_local_nobody
  • 7,947
  • 5
  • 29
  • 51
pnkj
  • 406
  • 5
  • 17

1 Answers1

0

Usually you would have some kind of base class that is shared between both view types.

There is a nice sample here showing a progressive migration from single view type to the pattern with a second view type getting injected from .insertSeparators.

https://developer.android.com/topic/libraries/architecture/paging/v3-transform#convert-ui-model

dlam
  • 3,547
  • 17
  • 20