I have created some TextViews and EditTexts dynamically as in the code below:
public void criaForm(){
for (int i = 0; i < vet.length; i++) {
TextView tv = new TextView(this);
tv.setText(paises[i])
layout.addView(tv);
EditText et = new EditText(this);
et.setId(i+x);
layout.addView(et);
}
x = x+3;
}
In my case, the size of the vector is 3 and create 3 TextView and EditTexts on the screen. I create an id for each one, however when I execute, on the screen it is as if there is only 1 EditText, in the case the last one, the 3rd. It's as if others did not exist, does anyone know how to solve this problem? Thank you in advance.