当再次新选择同一项目时,列表视图中项目的属性更改(或设置为新属性)

properties of an item in listview changes (or set to new properties) when the same item is newly selected again

我有一个项目的 ArrayList。我在数组列表中添加了一个具有某些属性的项目。当我再次将具有不同属性的相同项目添加到数组列表时,先前添加的项目的所有属性都设置为新项目的属性。 例如,如果我添加具有 Diesel 和 Sedan 等属性的汽车,我再次添加具有 Petrol 和 Hatchback 属性的汽车。

我应该看到 ArrayList 个这样的项目:

[0] Car(Diesel,Sedan)
[1] Car(Petrol,Hatchback)

但我是这样看的:

[0] Car(Petrol,Hatchback)
[1] Car(Petrol,Hatchback)

该列表在两个索引处包含相同的引用