I have the following doubt:
I create Views on Java and add to my LinearLayout, in this case a TextView(that is the label of my form) and two EditText’s below him, both to receive numbers with point float.
So, I create a ArrayList<TextView> and ArrayList<EditText> and after used a ‘for loop’ to fill with their respective View’s, and in the same loop and add him on LinearLayout.
My question is, how I can recover a reference to these View’s that I have done? I’m trying with ArrayList<EditText>.get(i).setId(12), but I’m not getting success, because can have much Views to create and there is the possibility of conflict >.<
They will not have resource ids. You actually have to reference them via the view you created yourself. Alternatively, you can get the view container and loop through them. From the ViewGroup docs: