80,351
社区成员
发帖
与我相关
我的任务
分享
public int getAllChildCount(ViewGroup viewGroup){
int count =viewGroup.getChildCount();
int totalCount = count ;
for(i = 0; i<count ;i++){
View child =viewGroup. getChildAt(i);
if(child != null && child instanceof ViewGroup ){
totalCount += getAllChildCount(viewGroup);
}
}
return totalCount;
}
[/quote]
谢谢
public int getAllChildCount(ViewGroup viewGroup){
int count =viewGroup.getChildCount();
int totalCount = count ;
for(i = 0; i<count ;i++){
View child =viewGroup. getChildAt(i);
if(child != null && child instanceof ViewGroup ){
totalCount += getAllChildCount(viewGroup);
}
}
return totalCount;
}