Android Studio Find All Views In Layout

[Solved] Android Studio Find All Views In Layout | Swift - Code Explorer | yomemimo.com
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

Answers related to android studio find all views in layout

Code Explorer Popular Question For Swift