1
I 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 vector size is 3 and create 3 Textview and Edittexts on the screen. I create an id for each one, however when I run, on the screen it’s like there’s only 1 Edittext, in this case the last one, the 3rd one. it is as if the others did not exist,does anyone know how to solve this problem? I thank you already.
I’m using Linearlayout and I’m using this click method and I still have the same problem.
– daniel12345smith