title: How to get values of all EditText inside a ListView
body: <p>I want to get all the values of all the EditText elements that are present inside my ListView.
  This is my code :</p>
  
  <pre><code>final ListView editorList = (ListView) findViewById(R.id.editorList);
          final EditorAdapter adapter = new EditorAdapter(context, data);
          editorList.setAdapter(adapter);
  
  
          Button commitButton = (Button) findViewById(R.id.commit_button);
          commitButton.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  // TODO Auto-generated method stub
                  try{
                      //System.out.println("Size of List : " + editorList.getChildCount());
                      for(int i =0;i&lt; data.size() ;i++){
                          System.out.println("Size of List : " + data.size());
  
                          EditText value = adapter.getItem(i);
                          String propertyValue = value.getText().toString();
                          System.out.println("PropertyValue : " + propertyValue);
  
  
                      }
                  } catch (Exception e){
                      e.printStackTrace();
                  }
              }
          });
  </code></pre>
  
  <p>This is my Adapter class :</p>
  
  <pre><code>package in.omerjerk.preferenceseditor;
  
  
  public class EditorAdapter extends BaseAdapter {
  
  Context context;
  ArrayList&lt;HashMap&lt;String,String&gt;&gt; data;
  EditText[] mHolders;
  
  public EditorAdapter(Context context, ArrayList&lt;HashMap&lt;String,String&gt;&gt; data){
  
      this.context = context;
      this.data = data;
      System.out.println("No . of items in nodes"+data.size());
      mHolders = new EditText[data.size()];
  
  }
  
  @Override
  public int getCount() {
      // TODO Auto-generated method stub
      return data.size();
  }
  
  @Override
  public EditText getItem(int pos) {
      // TODO Auto-generated method stub
      return mHolders[pos];
  }
  
  @Override
  public long getItemId(int pos) {
      // TODO Auto-generated method stub
      return pos;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      ViewHolder holder;
      if(convertView==null){
          System.out.println("CONVERT VIEW IS NULL");
          holder = new ViewHolder();
          convertView = LayoutInflater.from(context).inflate(R.layout.row_edit_string,null,false);
          holder.editPropertyValue = (EditText) convertView.findViewById(R.id.propertyValue);
          holder.propertyName = (TextView) convertView.findViewById(R.id.propertyName);
  
          holder.propertyName.setText(data.get(position).get("propertyName"));
          holder.editPropertyValue.setText(data.get(position).get("propertyName"));
          convertView.setTag(holder);
  
  
  
      }else{
          System.out.println("CONVERT VIEW NOT NULL");
          holder = (ViewHolder) convertView.getTag();
          holder.propertyName.setText(data.get(position).get("propertyName"));
          holder.editPropertyValue.setText(data.get(position).get("propertyName"));
          convertView.setTag(holder);
          mHolders[position] = new EditText(context);
          mHolders[position] = holder.editPropertyValue;
      }
  
      return convertView;
  }
  
  }
  </code></pre>
  
  <p>I'm getting strange error in my output. The mHolders array only contain upto 6-7 elements and these elements are repeated in the entire array. I'm able to get the values of EditText but the error is not correct.</p>