How to use PagedList placeholders without knowing the total size of the list

Viewed 874

Using the Android Architecture Components paging library, I want to render placeholder views when the DataSource is loading new items that are already in view.

According to the documentation, this requires a countable data set. I am using a custom DataSource that fetches items from an API that cannot provide the total number of items. However, I still want render placeholders for items that are currently being loaded, even if this would lead to flickering when the API returns less items than the amount of placeholders being shown.

Is there any way to achieve this?

0 Answers
Related