I have the following code that creates 4 EditText in Layout:
LinearLayout myLayout = (LinearLayout) findViewById(R.id.formulario);
ViewGroup.LayoutParams lp = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
EditText[] pairs=new EditText[4];
for(int l=0; l<4; l++)
{
pairs[l] = new EditText(this);
pairs[l].setTextSize(15);
pairs[l].setLayoutParams(lp);
pairs[l].setId(l);
pairs[l].setText((l + 1) + ": something");
myLayout.addView(pairs[l]);
}
How do I retrieve values from each field?