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