I made a lot of research, but I couldn't find any resource how to use Recycler View with Firebase
(or vice versa)
There is one Firebase list adapter which extends from BaseAdapter
. I found it in Firebase Chat application. Here is the FirebaseListAdapter class. But the adapter which is used by RecyclerView needs to be extended from RecyclerView.Adapter
.
How did you overcome this problem? Do you have any suggestion?
you can use the FirebaseUI-Android, it is developed by Firebase itself which is quite useful.
The link shown as below.
https://github.com/firebase/FirebaseUI-Android/blob/master/database/README.md
For the moment you will have to provide your own implementation of the RecyclerView.Adapter.
You can use the FirebaseListAdapter for inspiration or roll your own.
Here's a chat app that uses a RecyclerView: https://github.com/thaleslima/Chat-Firebase/tree/master/app/src/main/java/com/gdgcampinas/chat_firebase
Update
There is now a library called FirebaseUI that includes a
FirebaseRecyclerAdapter
and much more. I highly recommend that you use that one in your apps or as the basis for an adapter that suits your needs.