I have a listView with an overriden ArrayAdapter. In contains an ArrayList. The object Order can have following states:
- NEW
- READ
- ACCEPTED
- CANCELLED
Depending on the state of the order I inflate a different Layout and fill it with the values in the getView method and return as View. Orders are being synchronized with the server every minute. This works all like it should. If a new Order comes, it is inserted into the ArrayList and NotifyDataSetChange is called and the listView is updated. However, for some reason, some of the existing items in the list change their layout (the state is not changed, checked in the logs). This happens everytime NotifyDataSetChanged is called and I don't see any logic or anything in this behavior. Does anyone know why is this happening?
Thanks, Filip