title: How to obtain Edittext values from dynamically created editttexts using a single button
body: <p>I am splitting a string and putting the result in edittexts using a loop so that the user can edit the data.thereafter he can  save  all the data in 
  the edittexts by just pressing  the final button.Problem is i don't know how to get each value from the edittext when he pressses the save button.this is my code:</p>
  
  <pre><code>  EditText etstringone,etstringtwo; 
    Button btn_save;
    btnsave=new Button(this);
  
    String mystring="somevalue";
    String del="\\|";
    String[] splitResult = mystring.split(del); 
  
    for (String e : splitResult)
      {
  
       etstringone=new EditText(this);
       etstringtwo=new EditText(this);
  
      etstringone.setText(splitResult[0]);
      etstringtwo.setText(splitResult[1]);
  
      mylayout.addView(etstringone);
      mylayout.addView(etstringtwo);
      }
    mylayout.addView(btnsave);
  
    btnsave.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View arg0) {
              // how to get each value from the edittexts and output each to logcat,,i'll do the saving  and the rest
  
          }
      });
  </code></pre>
  
  <p>how do i go about this?thanks.</p>
  
  <p>NB:emphasis on using a single button to get all the data,i managed to do a scenario for apppending a new save button each time the 
          loop runs but its not neat.</p>