I'm using Android Paging Library, and probably don't use it 100% correct.
I have a RecyclerView and a SnapHelper to basically implement a ViewPager.
My pages are per date, e.g. 2019-03-21, so there can be infinite amount of pages.
What I implemented is a ItemKeyedDataSource<String,String>
which has the date as its param, and on loadAfter and loadBefore, all I do is add/sub a day.
This currently works just fine. If, for example, I load 2019-03-21, then I can easily cycle to its neighbors 2019-03-20 and 2019-03-22.
However, I'd like to add a feature to load a specific date, and then scroll there.
Using PositionalDataSource
doesn't sound good either, since I can't say there's a finite count of items in my list.
I feel like I'm doing it wrong. Just not really sure what. Also, if there's another way that doesn't include paging (sounds reasonable, since my paging is just doing some calculations but doesn't retrieve data), that's good too.