List view items changes position when scrolling android?

I had the same issue then below link resolved my problem ;

https://stackoverflow.com/a/36738935/3341089

Basically, you should specify your item types then reconfigure your adapter via getItemViewType(int position) and getViewTypeCount() override methods.

If you look into above link, you will get it.


In your adapter class override these two methods

@Override
  public int getViewTypeCount() {

   return getCount();
  }

  @Override
  public int getItemViewType(int position) {

   return position;
  }

Note: For recyclerview just method getItemViewType(int position) will work.