title: Progressbar in Recyclerview
body: <p>I am working on a android project in which there will be a Recyclerview consisting of items(rows). At run time whenever item(row) is added to the Recyclerview, it starts uploading to server and updates the progressbar in that item(row). Each Item here is a file. Everything goes fine as long as the items are added till the size of the screen. Whenever items cross the screen limit, I would need to scroll. While scrolling, progressbar updating on different item. sometimes on two or more items. After googling a lot, I understood that it is because of the Recyclerview reusing already created viewholders.</p>
  
  <p>here is my Adapter Code of recyclerview:</p>
  
  <pre><code>    public class MyViewHolder extends RecyclerView.ViewHolder {
  
      private TextView filename;
  
      private ProgressBar file_progressbar;
  
      public MyViewHolder(View v) {
  
          super(v);
  
          filename = (TextView) v.findViewById(R.id.filename);
  
          file_progressbar = (ProgressBar) v.findViewById(R.id.file_progressbar);
  
      }
  
  }
  
  
      public void onBindViewHolder(final MyViewHolder holder, final int position) {
  
  
      final String fname = fDataset.get((fDataset.size() - 1) - position);
  
      File f = new File(fname);
  
      holder.filename.setText(f.getName());
               if(internetchek.isNetworkAvailable(this.ctx))
               {
  
                   holder.file_progressbar.setVisibility(View.VISIBLE);
  
                   upload up = new upload(this.ctx,fname,holder.file_progressbar,"uploadstart");
  
                   up.execute();
               }
              else {
  
                   Toast.makeText(this.ctx, "Offline", Toast.LENGTH_LONG).show();
  
               }
  
  
          }
  </code></pre>
  
  <p>I have passed holder.file_progressbar into upload class. So that the progressbar gets updated in Upload class. I am not getting any idea how to resolve this issue. Thanks in advance</p>