Getting child elements from LinearLayout
You can always do something like this:
LinearLayout layout = setupLayout();
int count = layout.getChildCount();
View v = null;
for(int i=0; i<count; i++) {
v = layout.getChildAt(i);
//do something with your child element
}
I think this could help: findViewWithTag()
Set TAG to every View you add to the layout and then get that View by the TAG as you would do using ID