I received two different ArrayList in adapter where they are not equal. arrays include properties of two different products where I wanna merge theys until making one list include all properties and then compare. How do I do this? And are there any principles for this operation to be done inside the adapter? Or is it better to do this on the server-side?
Asked
Active
Viewed 247 times
0
-
1This has plenty of list comparison in Kotlin: https://stackoverflow.com/questions/52054104/comparing-two-lists-in-kotlin – Darshan Dec 05 '21 at 18:54
-
It’s not usually recommended to do logic in your UI classes. Typically this merging would be done upstream and your Fragment would be getting the merged list and passing it along to the adapter. – Tenfour04 Dec 05 '21 at 19:01