Paging Library Filter/Search

You can solve this with a MediatorLiveData. Specifically Transformations.switchMap. // original code, improved later public void reloadTasks() { if(liveResults != null) { liveResults.removeObserver(this); } liveResults = getFilteredResults(); liveResults.observeForever(this); } But if you think about it, you should be able to solve this without use of observeForever, especially if we consider that switchMap is also doing … Read more

Paging library – Boundary callback for network + db with API taking page and size

The documentation has this to say on the issue: If you aren’t using an item-keyed network API, you may be using page-keyed, or page-indexed. If this is the case, the paging library doesn’t know about the page key or index used in the BoundaryCallback, so you need to track it yourself. You can do this … Read more