0

I have a listview with customized elements (4 elements per row). I have also used a costumized ArayAdapter which has a parameter named position.

My question is: once when the list is established and I have it on the screen, when i am scrooling, the elements position changes: why and how to block this.

I am asking this because my code depeds in those positions, I am using if( position==...)

Cœur
  • 34,719
  • 24
  • 185
  • 251
Milos Cuculovic
  • 18,933
  • 50
  • 154
  • 263
  • How do they "change"? What have you tried? – bschultz Feb 16 '12 at 15:35
  • For exemple, i am doing if (poistion ==10) then put a green image on a row which has the position 10. the problem is that the row wit the position 10 will change when I am scrroling a cople of times. For example, after scrooling a couple of times, the initial row 10 will be with another number – Milos Cuculovic Feb 16 '12 at 15:38
  • So it is not putting the green image on the correct row position? – bschultz Feb 16 '12 at 15:39
  • First time the view is created yes, but when scrooling a couple of times no, the image change position – Milos Cuculovic Feb 16 '12 at 15:43
  • I have found the answer, here is: http://stackoverflow.com/questions/2955218/listview-in-arrayadapter-order-gets-mixed-up-when-scrolling/3874639#3874639 – Milos Cuculovic Feb 16 '12 at 15:50
  • The answer can be find here: http://stackoverflow.com/questions/2955218/listview-in-arrayadapter-order-gets-mixed-up-when-scrolling/3874639#3874639 – Milos Cuculovic Oct 11 '12 at 12:46

0 Answers0