1
I have an APP, which preencho a quantidade de jogadores
that will have the championship and I click on a botão
to create the championship.
This button plays for a activity
that takes the amount that was set and gera N EditText
with a loop. So far ok.
After you begat these EditText
, I fill in all the names, and I need that when I click on botão
, he go to another activity
and take the valores
of EditText
.
To questão
is: how I pull them valores
of EditText
, if they are generated programmatically and precisely ID
for that reason ??
It would be throwing them into an array and then consulting !?
Example of what I use to generate EditText
without the loop for now:
public class MainActivity extends AppCompatActivity {
private LinearLayout ll;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ll = (LinearLayout) findViewById(R.id.layout);
EditText et = new EditText(this);
et.setText("Jogador");
ll.addView(et);
}
Where would that enter my loop if I don’t have the right amount of Edittexts ?
– rbz
That way when you click the button, you will pass the values of one acitity to another..
– Dev
I understand better what you’re talking about...
– Dev
Yes, but I have to do this for a varied amount of Edittext... as I know which names or ID ?
– rbz
I reedited my answer from a glance
– Dev