title: Change Listview item image on click in Android
body: <p>i want to change particular listview images when click on nect and prev button but Changed all list view images when click on next and prev button</p>
  
  <pre><code>public class ListAdapter extends ArrayAdapter&lt;String&gt;{
  
      Context context;
       String imgurl;
       String[] imageUrls;
       int i=1;
       ViewHolder holder = null;
  
      ArrayList&lt;String&gt; strimgview,strstreetname,strLocation,strSquarefootage,strPrice,strPosted,strURL,strId;
       ImageLoader imageLoader = ImageLoader.getInstance();
       DisplayImageOptions options = new DisplayImageOptions.Builder().cacheInMemory(true)
                      .cacheOnDisc(true).resetViewBeforeLoading(true).build();
      public ListAdapter(Context context,ArrayList&lt;String&gt; strimgview, ArrayList&lt;String&gt; strstreetname, 
              ArrayList&lt;String&gt; strLocation,ArrayList&lt;String&gt; strSquarefootage,
              ArrayList&lt;String&gt; strPrice,ArrayList&lt;String&gt; strPosted,
              ArrayList&lt;String&gt; strId,ArrayList&lt;String&gt; strURL)
      {
          super(context, R.layout.propertyrow,strstreetname);
          this.context= context;
          this.strimgview= strimgview;
          this.strstreetname= strstreetname;
          this.strLocation= strLocation;
          this.strSquarefootage= strSquarefootage;
          this.strPrice= strPrice;
          this.strPosted= strPosted;
          this.strURL= strURL;
  
  
      }
       public View getView(int position, View convertView, ViewGroup parent) {
           LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);
              View row = convertView;
  
              if (row == null) {
                 row=mInflater.inflate(R.layout.propertyrow, parent,false);
  
             holder = new ViewHolder();
             holder.imgProperty =(ImageView) row.findViewById(R.id.npTupleImage);
  
             holder.txtStreetName= (TextView) row.findViewById(R.id.npTupleProjectName);
             holder.txtLocation= (TextView) row.findViewById(R.id.npTupleBuilder);
             holder.txtSquareFotage= (TextView) row.findViewById(R.id.npTupleProjectAddress);
             holder.txtPrice =(TextView) row.findViewById(R.id.npTupleProjectDistance);
             holder.txtprev =(TextView) row.findViewById(R.id.prev);
             holder.txtnext =(TextView) row.findViewById(R.id.next);
           //txtprev.setVisibility(View.INVISIBLE);
           //txtnext.setVisibility(View.INVISIBLE);
             holder.imglike= (ImageView) row.findViewById(R.id.unsavebtn);
             holder.imglike.setVisibility(View.INVISIBLE);
              row.setTag(holder);
              }
              else {
                  holder = (ViewHolder) row.getTag();
              }
          // txtposted.setText("EnteredDate :"+strPosted.get(position));
             holder.txtStreetName.setText("Street Name :"+strstreetname.get(position));
             holder.txtLocation.setText("Location :"+strLocation.get(position));
             holder.txtSquareFotage.setText("SquareFootage :"+strSquarefootage.get(position));
             holder.txtPrice.setText("Price :$"+strPrice.get(position));
             holder.imgProperty.setTag(position);
           // Log.d("Img",strimgview.get(position));
           try{
              // ArrayList&lt;String&gt; imgurl=new ArrayList&lt;String&gt;();
                imgurl= ""+strimgview.get(position);
                imageUrls=imgurl.split("\\|\\|");
                for(int j=0;j&lt;imageUrls.length-1;j++)
                    imageLoader.displayImage(imageUrls[i], holder.imgProperty, options);
  
           }
           catch(Exception e)
           {
               Toast.makeText(context, "Load"+e, Toast.LENGTH_LONG).show();
           }
  
           holder.imglike.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  //Toast.makeText(context, "Want to save", Toast.LENGTH_LONG).show();
  
              }
          });
  
           holder.txtprev.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
  
  
                  try{
  
                    if(i!=1)
                    {
                        i--;
                        imageLoader.displayImage(imageUrls[i], holder.imgProperty, options);
                    Log.d("imageUrlnew ",imageUrls[i]);
  
                    }
  
  
                   }
                   catch(Exception e)
                   {
                      // Toast.makeText(context, "next"+e, Toast.LENGTH_LONG).show();
  
                   }
  
                   notifyDataSetChanged();
              }
          });
  
           holder.txtnext.setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      // TODO Auto-generated method stub
                       try{
  
  
                            if((i&lt;imageUrls.length-1))
                            {
                                i++;
                                imageLoader.displayImage(imageUrls[i], holder.imgProperty, options);
  
                            Log.d("imageUrlnew ",imageUrls[i]);
  
                            }
                           }
                           catch(Exception e)
                           {
                               // Toast.makeText(context, "prev"+e, Toast.LENGTH_LONG).show();
                           }
                       notifyDataSetChanged();
                  }
              });
  
           return row;
  
  
       }
  
        class ViewHolder {
              ImageView imgProperty;
              TextView txtprev,txtnext;
              TextView txtStreetName;
              TextView txtLocation;
              TextView txtSquareFotage;
              TextView txtPrice;
              ImageView imglike;
              ProgressBar progressBar;
        }
  
  }
  </code></pre>
  
  <p>Please help me how can fix this issue</p>
  
  <p>Thanks In Advance</p>
  
  <p><img src="https://i.stack.imgur.com/tHsfS.jpg" alt="enter image description here"></p>