I'd like to sort my Listview by int value. I've looked in similar questions and solutions and have done something like this but it is not sorting listView descending (nothing happens btw). In arrayList are objects which this object has field named "rating". Here is a code:

```
public class GifModel implements Comparable<GifModel>, Comparator<Integer>{
.......
.......

@Override
    public int compare(Integer lhs, Integer rhs) {
        // TODO Auto-generated method stub
        return lhs.intValue() > rhs.intValue() ? 1:0;
    }

}

```

And in main activity. "ratingSort" is a List:

```
ratingSort = new ArrayList<GifModel>(list);

    Collections.sort(ratingSort, new Comparator<GifModel>() {
        @Override
        public int compare(GifModel lhs, GifModel rhs) {
        return lhs.compare(lhs.getRating(),rhs.getRating());
        }

        });

```