Skip to content

Firebase Database Paging Support - [New Feature-Pagination] #1601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PatilShreyas opened this issue Mar 18, 2019 · 7 comments
Closed

Firebase Database Paging Support - [New Feature-Pagination] #1601

PatilShreyas opened this issue Mar 18, 2019 · 7 comments

Comments

@PatilShreyas
Copy link
Contributor

PatilShreyas commented Mar 18, 2019

Firebase Realtime Database has FirebaseRecyclerAdapter to show Data Items in RecyclerView. But, the issue is it has not Paging support added until now. I have developed a solution on Pagination of Firebase Database in RecyclerView on below repository with library code and sample app.
https://github.com/PatilShreyas/FirebaseRecyclerPagination

I referred source code of FirestorePagingAdapter while developing the solution.
FirebaseRecyclerPagingAdapter is built on top of Android Paging Support Library.
So, I request you to please permit me to add this feature in the official FirebaseUI library to help developers with this paging library to load data in pages.
Can I fork this repository and make this feature available?

@PatilShreyas PatilShreyas changed the title FirebaseRecyclerPagingAdapter - Pagination Firebase Database Paging Support - [New Feature-Pagination] Mar 18, 2019
@samtstern
Copy link
Contributor

@PatilShreyas thanks for filing this! So since you based this on the Firestore adapter, does that mean the tradeoffs are the same? In particular, does the adapter ignore realtime updates?

@PatilShreyas
Copy link
Contributor Author

Yes. Till now, it does not support realtime updates.

@samtstern
Copy link
Contributor

@PatilShreyas ok in that case I'd be happy to review this feature! Can you send a Pull Request with the target branch as version-4.3.2-dev?

@samtstern samtstern added this to the 4.4.0 milestone Mar 19, 2019
@PatilShreyas
Copy link
Contributor Author

@samtstern Thank you !
I will do it.

PatilShreyas added a commit to PatilShreyas/FirebaseUI-Android that referenced this issue Mar 20, 2019
Implementation of Paging for Firebase Database
@PatilShreyas
Copy link
Contributor Author

@samtstern I have updated code as you suggested here #1603
Implemented the same as Firestore version.

PatilShreyas added a commit to PatilShreyas/FirebaseUI-Android that referenced this issue Mar 23, 2019
Fixed some code and minor changes.
PatilShreyas added a commit to PatilShreyas/FirebaseUI-Android that referenced this issue Mar 25, 2019
…se#1601

Added functionalities :
1. retry() : Retry the loading of data in RecyclerView after failure.

2. refresh() : Reload data in RecyclerView by clearing recent loaded data.
PatilShreyas added a commit to PatilShreyas/FirebaseUI-Android that referenced this issue Mar 26, 2019
@samtstern
Copy link
Contributor

This has been fixed and released in 5.0.0

@SerggioC
Copy link

Does the adapter support realtime updates now?
I need an implementation of paging with realtime updates of the current page if the database is updated in that interval of data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants