Firebase Database users know that there are two basic listeners for listening Data: ValueEventListener and ChildEventListener. It works great when
I had the same exact problem (ValueEventListener vs ChildEventListener for RecyclerView in Android).
The solution I used was to combine both this way :
Suppose dbref points to a firebase db location where my posts are.
vel = dbref.addValueEventListener(vel);dbref.removeEventListener(vel);.
This is not necessary if you used dbref.addListenerForSingleValueEvent(vel);
in step 1.query = dbref.orderByChild(post.createdat).startAt(System.currentTimeMillis())query.addChildEventListener(cel);