I've been searching all over the internet, while there are ways to create an endless scroller, for simple recyclerviews, there aren't any for the firebase recyclerview adapter. If anyone has implemented this, please help!
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I was facing the same problem, and didn't find any solution for that But i achieved it. Won't call it a right solution but it gave me the desired output.
Lets take an example, i have a list of cars in my Firebase Database and i want to display that in my app. In my App, there is a button "Show All The Cars" which takes me to a new Activity where I have to display all the cars from my Firebase database.
Solution: At first I tried to load the Firebase data in my Second Activity which worked fine. But as the data increased, the RecyclerView started Jittering. So instead of retrieving the Firebase data in my Second Activity, I retrieved the Firebase data in my FirstActivity when the button was clicked (in a ArrayList). then after the complete data is retrieved, Intent was called, and I sent the
Arraylist
with my firebase data to the secondActivity as an Extra in Intent.You can then retrieve your
ArrayList
and Apply the normal Endless recyclerView logic to theArrayList
.The Other question i think would come up right now is How to check if the Firebase is done retrieving data ? (Again After a huge amount of research I found this)
Firebase events are not executed in sequence, the Value even is always executed last, So In my
onClickListener
i had twoEventListeners
OnChildEventListener
(too load my actual data)addListenerForSingleValueEvent
(this would be executed last)So now, writing code inside
addListenerForSingleValueEvent()
would be executed last (The Intent with Arraylist as an Extra)I don't know if this answered your Question, but I hope this helps.