📅  最后修改于: 2022-03-11 14:52:36.313000             🧑  作者: Mango
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) {
...
}
}