Is there a way to find item and scroll to that viewholder using PagingDataAdapter?
Asked Answered
W

1

6

I'm using Android Paging Library 3. Is there a way to find item and scroll to that viewholder using PagingDataAdapter? As I'm not able to access the item list. Or I have no choice but have to use normal list adapter?

Woodley answered 4/8, 2020 at 3:4 Comment(0)
D
7

The next version of paging (3.0.0-alpha04) will add .peek(index) and .snapshot() APIs to allow presented item access post-transformations of loaded data.

In the meantime the workaround is to use PagingDataAdapter.getItem() but this is suboptimal because it triggers page fetch.

Datum answered 5/8, 2020 at 7:57 Comment(2)
I see, thanks a lot for the response! Hope it releases soon.Woodley
This is out now!Datum

© 2022 - 2024 — McMap. All rights reserved.