app/src/main/java/com/firebase/uidemo/database/firestore/FirestorePagingActivity.java [96:120]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            if (append instanceof LoadState.Loading) {
                mBinding.swipeRefreshLayout.setRefreshing(true);
            }

            if (append instanceof LoadState.NotLoading) {
                LoadState.NotLoading notLoading = (LoadState.NotLoading) append;
                if (notLoading.getEndOfPaginationReached()) {
                    // This indicates that the user has scrolled
                    // until the end of the data set.
                    mBinding.swipeRefreshLayout.setRefreshing(false);
                    showToast("Reached end of data set.");
                    return null;
                }

                if (refresh instanceof LoadState.NotLoading) {
                    // This indicates the most recent load
                    // has finished.
                    mBinding.swipeRefreshLayout.setRefreshing(false);
                    return null;
                }
            }
            return null;
        });

        mBinding.pagingRecycler.setLayoutManager(new LinearLayoutManager(this));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



app/src/main/java/com/firebase/uidemo/database/realtime/FirebaseDbPagingActivity.java [98:122]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            if (append instanceof LoadState.Loading) {
                mBinding.swipeRefreshLayout.setRefreshing(true);
            }

            if (append instanceof LoadState.NotLoading) {
                LoadState.NotLoading notLoading = (LoadState.NotLoading) append;
                if (notLoading.getEndOfPaginationReached()) {
                    // This indicates that the user has scrolled
                    // until the end of the data set.
                    mBinding.swipeRefreshLayout.setRefreshing(false);
                    showToast("Reached end of data set.");
                    return null;
                }

                if (refresh instanceof LoadState.NotLoading) {
                    // This indicates the most recent load
                    // has finished.
                    mBinding.swipeRefreshLayout.setRefreshing(false);
                    return null;
                }
            }
            return null;
        });

        mBinding.pagingRecycler.setLayoutManager(new LinearLayoutManager(this));
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



