具有setInitialKey的PageKeyedDataSource

时间:2018-09-23 12:58:08

标签: android android-architecture-components android-paging-library

当我在PagedList上设置initialKey时,将调用PageKeyedDataSource中的哪个方法? PagedList<Employee> pagedList = new PagedList.Builder<>(dataSource, config) .setMainThreadExecutor(new MainThreadExecutor()) .setBackgroundThreadExecutor(Executors.newSingleThreadExecutor()) .setInitialKey(50) .build();

1 个答案:

答案 0 :(得分:0)

.setInitialKey不会影响PageKeyedDataSource。即使您传递值10000,PageKeyedDataSource也会调用loadInitial方法。