如何通过Firebase UI在FirestorePagingAdapter中使用分页按钮?

时间:2018-08-20 12:22:58

标签: android firebase google-cloud-firestore firebaseui

我关注了firestorepaging adapter的FirebaseUI文档,但是现在我打算使用按钮重新加载“下一页”吗?

有人可以指导如何从这里继续吗?

Query baseQuery = mItemsCollection.orderBy("value", Query.Direction.ASCENDING);

// This configuration comes from the Paging Support Library
// https://developer.android.com/reference/android/arch/paging/PagedList.Config.html
PagedList.Config config = new PagedList.Config.Builder()
        .setEnablePlaceholders(false)
        .setPrefetchDistance(10)
        .setPageSize(20)
        .build();

// The options for the adapter combine the paging configuration with query information
// and application-specific options for lifecycle, etc.
FirestorePagingOptions<Item> options = new FirestorePagingOptions.Builder<Item>()
        .setLifecycleOwner(this)
        .setQuery(baseQuery, config, Item.class)
        .build();

0 个答案:

没有答案