I am storing data in Firebase storage.
Object Comment
with attribute timestamp
. When I push data from device to Firebase I\'m populating
I don't see any option to reverse the data. But One Brute way is to get the data.
List mList=new ArrayList();
public void onDataChange(DataSnapshot dataSnapshot)
{
mList.clear();
for(DataSnapshot children: dataSnapshot.getChildren()){
ModelClass modelClass=children.getValue(ModelClass.class);
mList.add(modelClass);
}
Collections.reverse(mList);
Adapter.notifyDataSetChanged();
}