How to add date separators in recycler view using Paging Library?

前端 未结 6 1475
感动是毒
感动是毒 2021-02-05 10:34

After a lot of searching, I know its possible with regular adapter, but I have no idea how to do it using Paging Library. I don`t need code just a clue.

Example

6条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 11:15

    As mentioned here, Paging Library works with PagedListAdapter. And PagedListAdapter extends from RecyclerView.Adapter, so you can do this simply like in Recyclerview (example). Just in two words - you need to use different view types for your date headers and content items.

提交回复
热议问题