Android: SortedList with duplicates

后端 未结 6 995
栀梦
栀梦 2021-02-19 21:58

I have some problems understanding RecyclerViews SortedList.

Lets say I have a very simple class only having a very simple class holding data:<

6条回答
  •  情深已故
    2021-02-19 22:02

    I think you should use Integer.compare(o1.id, o2.id); in compare method, it's where SortList decide those 2 items are the same or not.

提交回复
热议问题