Question : android studio find all views in layout
Answered by : abdul-h
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) { ... }
}
Source : https://stackoverflow.com/questions/13887003/android-how-to-find-views-by-type | Last Update : Tue, 11 Aug 20