Is there any method for counting the occurrence of each item on recyclerview ?
(是否有任何方法可以计数recyclerview上每个项目的出现?)
Lets say I have recyclerview items:
(可以说我有recyclerview项目:)
String[] array = {"item1","item1","item2","item2", "item3", "item4"};
expected output :-
(预期产量:-)
item1 2
item2 2
item3 1
item4 1
I already create recycleview adapter, but i don't know how to count the same item.
(我已经创建了recycleview适配器,但是我不知道如何计算同一项目。)
please help (请帮忙)
ask by rangga ario translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…