android怎样取得ViewGroup里面的所有ImageView

来源:互联网 发布:python计算两点距离 编辑:程序博客网 时间:2024/06/03 23:46

LinearLayout layout= new LinearLayout(this);
int count = layout.getChildCount();
Listall ImageViews = newArrayList();
for(int index=0; View child=layout.getChildAt(index);
if(child instanceof ImageView)
allImageViews.add((ImageView)child);
}

}

原创粉丝点击