When sorting the internal contactList in different ways, the index position returned from when a user presses a list item may be faulty since it may change in-between first displaying the list and user pressing it.
On top of this android must reference the internal list in order to detect changes and thereby update the graphics upon a change.
Either this isn't a problem, because the list is never resorted in-between list being shown, and user pressing it, or it will result in faulty indexes, by this cause.
Normally you would return a copy of the internal list to the graphics, but in order for android to detect changes, as mentioned above. This cannot however be done without either forcing us to also update the copy, which is very unpractical, or to disregard Android's standard way, by using for example an Observer-pattern, but that's just wrong!
When sorting the internal contactList in different ways, the index position returned from when a user presses a list item may be faulty since it may change in-between first displaying the list and user pressing it.
On top of this android must reference the internal list in order to detect changes and thereby update the graphics upon a change.
Either this isn't a problem, because the list is never resorted in-between list being shown, and user pressing it, or it will result in faulty indexes, by this cause.
Normally you would return a copy of the internal list to the graphics, but in order for android to detect changes, as mentioned above. This cannot however be done without either forcing us to also update the copy, which is very unpractical, or to disregard Android's standard way, by using for example an Observer-pattern, but that's just wrong!