I am storing data in Firebase storage.
Object Comment
with attribute timestamp
. When I push data from device to Firebase I\'m populating
I have solved problem by extending FirebaseListAdapter and overriding getItem method:
public abstract class ReverseFirebaseListAdapter extends FirebaseListAdapter {
public ReverseFirebaseListAdapter(Activity activity, Class modelClass, int modelLayout, Query ref) {
super(activity, modelClass, modelLayout, ref);
}
public ReverseFirebaseListAdapter(Activity activity, Class modelClass, int modelLayout, DatabaseReference ref) {
super(activity, modelClass, modelLayout, ref);
}
@Override
public T getItem(int position) {
return super.getItem(getCount() - (position + 1));
}
}