title: How to change the button text on button click in custom adapter
body: <p>i have custom adapter for listview and i have button on that .</p>
  
  <p>so i want to change the button text on button click for that particular item on position.</p>
  
  <pre><code>&lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
  
          &gt;
  
          &lt;TextView
              android:id="@+id/name"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;Button
          android:id="@+id/btnadd"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="ADD"/&gt;
  </code></pre>
  
  <p>My custom adapter:</p>
  
  <pre><code>static class ViewHolder {
      public TextView name;
      public Button btnadd;
  }
  
  @Override
  public View getView(final int position, final View convertView,
                      ViewGroup parent) {
      final ViewHolder holder;
      View v = convertView;
  
      if (v == null) {
          final LayoutInflater vi = (LayoutInflater) context
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          v = vi.inflate(R.layout.row_brandselected, null);
          holder = new ViewHolder();
  
          holder.name = (TextView) v.findViewById(R.id.name);
  
  
          holder.btnadd = (Button) v.findViewById(R.id.btnadd);
  
          v.setTag(holder);
      } else {
          holder = (ViewHolder) v.getTag();
      }
  
      UserName mUserNrand = values.get(position);
  
      holder.name.setText(mUserBrand.getName().toString());
  
  
  
      holder.btnadd.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              if(holder.btnadd.getText().toString() == "ADD"){
  
                  holder.btnadd.setText("ADDED");
                  notifyDataSetChanged();
  
              }
  
  
  
  
  
          }
      });
  
      return v;
  }
  </code></pre>
  
  <p>When i am click on the button the button text is not changing for that particular item on that position.</p>
  
  <p>How can i change the button text on button click for that particular item on particular position?</p>