I am developing a price comparator and need to pull the bank name and category photo and the product node for each category which is a listview; (child) "child" ("categories"). child (idCat) .child ("products") receiving the id of the category in the idCat variable for each category receive the correct data? (I can already pull the category name and photo);
valueEventListenerCategorias = new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
//limpar lista
categorias.clear();
for (DataSnapshot dados: dataSnapshot.getChildren()){
cat_principal = dados.getValue(Cat_Principal.class);
categorias.add(cat_principal);
}
adapter.notifyDataSetChanged();
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
};'