What you can do is use setTag() and getTag() to maintain the scroll position and check that your ImageView of the ListView row does not change the resource.
Inside your getView() adapter, use the class
vi.setTag(R.id.btOnOFF, holder.btOnOFF);
And then enter it inside onItemClick() using getTag()
ImageView imgview = (ImageView) view.getTag(R.id.btOnOFF); imgview.setBackgroundResource(R.drawable.air_radio_button_rouge);
For more information, you can check my message.
Lalit poptani
source share