0
Good afternoon
I am trying to list all the items of a request in a Recycler view, but the query only returns a value as below :
public void recuperarItemPedido(String idPedido1) {
databaseReference = FirebaseConfig.getFirebaseDatabase().child("pedidos");
Query query = databaseReference.orderByChild("id").startAt(idPedido1).endAt(idPedido1+"\uf8ff");
query.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {
pedidoList.add(dataSnapshot1.getValue(Pedido.class));
}
Collections.reverse(pedidoList);
adapterDetalhes.notifyDataSetChanged();
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
on another screen, this same code returns all the items that are within the request. I don’t know what else can be
Good afternoon, I tried that too but it didn’t work...
– Tais Nayara
This could be the Firebaseconfig class. It shows her code
– Lucas Fernandes