LinearLayout l = (LinearLayout)getViewById(rv.getLayoutId());
int childCount = l.getChildCount();
//遍历下面所有的子控件,判断是否是layout
for(int i = 0; i < childCount; i++){
if(l.getChildAt(i) instanceof LinearLayout
|| l.getChildAt(i) instanceof RelativeLayout
|| l.getChildAt(i) instanceof TableLayout
|| l.getChildAt(i) instanceof AbsoluteLayout){
//操作代码
}
}
int childCount = l.getChildCount();
//遍历下面所有的子控件,判断是否是layout
for(int i = 0; i < childCount; i++){
if(l.getChildAt(i) instanceof LinearLayout
|| l.getChildAt(i) instanceof RelativeLayout
|| l.getChildAt(i) instanceof TableLayout
|| l.getChildAt(i) instanceof AbsoluteLayout){
//操作代码
}
}