Axbor Axrorov
Axbor Axrorov

Reputation: 2806

How to restore recyclerview position on screen rotates when using PagedListAdapter

I am using PagedListAdapter and PageKeyedDataSource from android paging library. I want to restore recyclerview position after screen rotates. How can I achieve this? setInitialLoadKey on LivePagedListBuilder doesn't effect to PageKeyedDataSource.

Upvotes: 1

Views: 162

Answers (1)

Axbor Axrorov
Axbor Axrorov

Reputation: 2806

It is not possible to achieve this behavior with PageKeyedDataSource. Instead I have to implement PositionalDataSource

Upvotes: 1

Related Questions