how to get child from layout in android

Solutions on MaxInterview for how to get child from layout in android by the best coders in the world

showing results for - "how to get child from layout in android"
Alessia
09 Feb 2017
1LinearLayout layout = setupLayout();
2int count = layout.getChildCount();
3View v = null;
4for(int i=0; i<count; i++) {
5    v = layout.getChildAt(i);
6    //do something with your child element
7}
8