how to find all types of view in layout android code example
Example: 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) {
...
}
}