android studio find all views in layout
LinearLayout rootLinearLayout = (LinearLayout) findViewById(R.id.rootLinearLayout);
int count = rootLinearLayout.getChildCount();
for (int i = 0; i < count; i++) {
View v = rootLinearLayout.getChildAt(i);
if (v instanceof LinearLayout) {
...
}
}