android-architecture-paging

Android Paging library sqlite data storage concern

◇◆丶佛笑我妖孽 提交于 2020-07-19 11:13:17
问题 Over the past days I have been getting comfortable with Android Architecture Components and I've been mostly interested in the Paging Library for handling and displaying lists of data from a remote source. For the best UX it is better to load data first into the database, in this case Room then display it in a recyclerview using the pagingLibrary and adapters. My concern is this, lets say an api has 1000s of records or a twitter feed even and all this data has to pass through the db then to

Android Paging library sqlite data storage concern

送分小仙女□ 提交于 2020-07-19 11:12:58
问题 Over the past days I have been getting comfortable with Android Architecture Components and I've been mostly interested in the Paging Library for handling and displaying lists of data from a remote source. For the best UX it is better to load data first into the database, in this case Room then display it in a recyclerview using the pagingLibrary and adapters. My concern is this, lets say an api has 1000s of records or a twitter feed even and all this data has to pass through the db then to

Update list items in PagingLibrary w/o using Room (Network only)

妖精的绣舞 提交于 2019-12-05 00:09:50
问题 I'm using Paging Library to load data from network using ItemKeyedDataSource . After fetching items user can edit them, this updates are done inside in Memory cache (no database like Room is used). Now since the PagedList itself cannot be updated (discussed here) I have to recreate PagedList and pass it to the PagedListAdapter . The update itself is no problem but after updating the recyclerView with the new PagedList , the list jumps to the beginning of the list destroying previous scroll