title: Android - setting a listener on items in each row of ExpandableListView
body: <p>On each row i have two EditTexts.when i change the first one , i want the other to be changed as well(if needed ,for now just setting there '25' for testing).I am using a viewholder pattern,and setting on each of the first edittexts a TextChangedListener,expecting the second to be changed as well .problem is , whenever i change ANY of the first edittexts on ANY of the rows ,only the edittext on the last row is changed. here is the code of the adapter(listener is in getgroupview):</p>
  
  <pre><code>public class CustomExpandableListAdapterNewWorkout extends BaseExpandableListAdapter {
      private Context context;
      private List&lt;String&gt; expandableListTitle;
      private HashMap&lt;String, List&lt;String&gt;&gt; expandableListDetail;
  
      private ChildViewHolder childViewHolder;
      private GroupViewHolder groupViewHolder;
  
      public CustomExpandableListAdapterNewWorkout(Context context, List&lt;String&gt; expandableListTitle,
                                                  HashMap&lt;String, List&lt;String&gt;&gt; expandableListDetail) {
          this.context = context;
          this.expandableListTitle = expandableListTitle;
          this.expandableListDetail = expandableListDetail;
      }
  
      @Override
      public Object getChild(int listPosition, int expandedListPosition) {
          return this.expandableListDetail.get(this.expandableListTitle.get(listPosition))
                  .get(expandedListPosition);
      }
  
      @Override
      public long getChildId(int listPosition, int expandedListPosition) {
          return expandedListPosition;
      }
  
      @Override
      public View getChildView(int listPosition, final int expandedListPosition,
                               boolean isLastChild, View convertView, ViewGroup parent) {
  
          final String expandedListText = (String) getChild(listPosition, expandedListPosition);
          String categoryName= (String)getGroup(listPosition);
  
          if (convertView == null)
          {
              LayoutInflater layoutInflater = (LayoutInflater) this.context
                      .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              convertView = layoutInflater.inflate(R.layout.list_item_exercises_exercise, null);
  
              childViewHolder = new ChildViewHolder();
              childViewHolder.mChildTitle =  (TextView) convertView.findViewById(R.id.expandedListItem);
              childViewHolder.mChildImage = (ImageView) convertView.findViewById(R.id.ImgExercisePic);
  
              convertView.setTag(childViewHolder);
          }
          else
          {
              childViewHolder = (ChildViewHolder) convertView.getTag();
          }
          childViewHolder.mChildTitle.setText(expandedListText);
          childViewHolder.mChildTitle.setTextAppearance(context,R.style.TitleStyle);
  
  
  
  
          return convertView;
      }
      @Override
      public int getChildrenCount(int listPosition) {
          return this.expandableListDetail.get(this.expandableListTitle.get(listPosition))
                  .size();
      }
  
      @Override
      public Object getGroup(int listPosition) {
          return this.expandableListTitle.get(listPosition);
      }
  
      @Override
      public int getGroupCount() {
          return this.expandableListTitle.size();
      }
  
      @Override
      public long getGroupId(int listPosition) {
          return listPosition;
      }
  
      @Override
      public View getGroupView(int listPosition, boolean isExpanded,
                               View convertView, ViewGroup parent) {
  
          String listTitle = (String) getGroup(listPosition);
  
          if (convertView == null)
          {
              LayoutInflater layoutInflater = (LayoutInflater) this.context.
                      getSystemService(Context.LAYOUT_INFLATER_SERVICE);
              convertView = layoutInflater.inflate(R.layout.list_group_new_workout_exercise, null);
  
              groupViewHolder = new GroupViewHolder();
              groupViewHolder.mGroupTitle = (TextView) convertView.findViewById(R.id.exerciseName);
              groupViewHolder.mMinSets = (EditText) convertView.findViewById(R.id.edtMinimumSets);
              groupViewHolder.mMaxSets = (EditText) convertView.findViewById(R.id.edtMaxSets);
  
              groupViewHolder.mMinSets.addTextChangedListener(new TextWatcher() {
                  @Override
                  public void beforeTextChanged(CharSequence s, int start, int count, int after) {
  
                  }
  
                  @Override
                  public void onTextChanged(CharSequence s, int start, int before, int count) {
  
                  }
  
                  @Override
                  public void afterTextChanged(Editable s) {
                      groupViewHolder.mMaxSets.setText("25");
                  }
  
              });
  
              convertView.setTag(groupViewHolder);
          }
          else
          {
              groupViewHolder = (GroupViewHolder) convertView.getTag();
          }
  
          groupViewHolder.mGroupTitle.setText(listTitle);
  
          return convertView;
      }
  
      @Override
      public boolean hasStableIds() {
          return false;
      }
  
      @Override
      public boolean isChildSelectable(int listPosition, int expandedListPosition) {
          return true;
      }
  
      public final class GroupViewHolder {
          TextView mGroupTitle;
          EditText mMinSets;
          EditText mMaxSets;
      }
  
      public final class ChildViewHolder {
          TextView mChildTitle;
          ImageView mChildImage;
  
      }
  }
  </code></pre>
  
  <p>probably there is something basic i don't understand about adapters and viewholders, and i would like to know the correct method to address it.</p>