I am new to android development..please forgive me .. I have a recycler view with photo and video I want to arrange photo according to likes that photo as got ...
the photo which as more like should be in top ...can you help me please ....
** I was using this code for comparing photo by date **
Collections.sort(mPhotos, new Comparator<Photo>() {
@Override
public int compare(Photo o1, Photo o2) {
return o2.getDate_created().compareTo(o1.getDate_created());
}
});