I have ten numberDecimal inputs with names input_1, input_2,...,input_10. In the mainActivity I'm getting theirs IDs by this way
EditText input_1 = (EditText) findViewById(R.id.input_1);
EditText input_2 = (EditText) findViewById(R.id.input_2);
...
EditText input_10 = (EditText) findViewById(R.id.input_10);
So I was wondering is there any way to get the IDs with FOR or any other cycle and arrays. For example something like this
for(i=1;i<10;i++) {
EditText input_i = (EditText) findViewById(R.id.input_i);
}
I've tried this but it didn't work. Sorry for my english and thank you in advance :)