i can read data normally but when i want to read data from firebase using rules of LIFO this time i can't read any kind of data . but i want to read data from firebase which data come my firebase last time
dref.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
String root_order = dataSnapshot.getKey();
for (long i = dataSnapshot.getChildrenCount(); i <= 0; i--) {
studentList.clear();
for (DataSnapshot snapshot : dataSnapshot.getChildren()) {
Student student = snapshot.getValue(Student.class);
studentList.add(student);
}
listView.setAdapter(adapter);
}
}
});
[1]: https://i.stack.imgur.com/f5pPw.png