title: How can i use Button OnClick in Custom ListView with View Holder
body: <p>I need some help, i am using a viewholder to display from a dynamic arrayadapter. </p>
  
  <p>I have list view . </p>
  
  <p>Each row contains ; </p>
  
  <ul>
  <li>Title (Textview),</li>
  <li>sub title(TextView),</li>
  <li>Progress bar</li>
  <li>Download Button (Button).</li>
  </ul>
  
  <p>I want to show progress bar and hide Download Button when Download Button is clicked. When download button in first row clicked, first progress bar is showing but 8th progress bar is showing too. </p>
  
  <p>This is my code. what i am doing wrong?</p>
  
  <pre><code>    public class TabInComingAdaptor extends BaseAdapter {
  
      public static class ViewHolder {
          TextView title;
          TextView desc;
          Button DownloadButton;
          ProgressBar pB;
      }
  
      private ArrayList&lt;rowObject&gt; data;
      private LayoutInflater inflater = null;
      private Application ap;
      // final private Activity currentActivity;
      Button progressButton1;
      int CurrentUser;
  
      public TabInComingAdaptor(Activity activity, Application application,
              ArrayList&lt;rowObject&gt; GelenFakslar) {
          // currentActivity = activity;
          ap = application;
          data = GelenFakslar;
          inflater = (LayoutInflater) ap
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
      }
  
      public int getCount() {
          return data.size();
      }
  
      public Object getItem(int position) {
          return position;
      }
  
      public long getItemId(int position) {
          return position;
      }
  
      public View getView(final int position, View vi, ViewGroup parent) {
          ViewHolder viewHolder;
          if (vi == null) {
              vi = inflater.inflate(R.layout.tab_incoming_row, parent, false);
              viewHolder = new ViewHolder();
              viewHolder.title = (TextView) vi.findViewById(R.id.RowTitle);
              viewHolder.desc = (TextView) vi.findViewById(R.id.RowDesc);
              viewHolder.DownloadButton = (Button) vi
                      .findViewById(R.id.RowDownloadButton);
              viewHolder.pB = (ProgressBar) vi
                      .findViewById(R.id.RowDownloadProgress);
  
              viewHolder.DownloadButton.setOnClickListener(new OnClickListener() {
  
                  @Override
                  public void onClick(View v) {
                      LinearLayout vwParentRow = (LinearLayout) v.getParent();
                      v.setVisibility(View.GONE);
                      ProgressBar zxcv = (ProgressBar) vwParentRow.getChildAt(0);
                      zxcv.setVisibility(View.VISIBLE);
                      vwParentRow.refreshDrawableState();
                  }
              });
              vi.setTag(viewHolder);
          } else {
              viewHolder = (ViewHolder) vi.getTag();
          }
  
          viewHolder.title.setText(data.get(position).getBaslik());
          viewHolder.desc.setText(data.get(position).getTarih());
  
          return vi;
      }
  }
  </code></pre>