Ruggero1912 / TrainerApp

Trainer-side app of TrainAround
https://paciosoft.com/projects/trainaround
1 stars 0 forks source link

the ordering of the listview of athletes in the UI should be fixed #10

Closed Ruggero1912 closed 2 years ago

Ruggero1912 commented 2 years ago

At the moment the order changes every time a new data is available and broadcasted by the GATTServerService. It should be better to implement an ordering function inside the broadcast receiver so that the athletes have a fixed order.

Add here as a comment the ordering method choosen.

Ruggero1912 commented 2 years ago

the ordering method is join time. Every time an update to an already present athlete obj arrives, the obj is updated with the method arrayList.set(oldObjIndex, newObj), so that the position in the array does not change.