android的ViewpPger中,如何遍历得到下面布局问加你中的所有控件,方便对控件进行统一管理
for (int i = 0; i < mScrollLayout.getChildCount(); i++) {View scroll = mScrollLayout.getChildAt(i);
for (int j = 0; j < ((ViewGroup) scroll).getChildCount(); j++) {
View relative = ((ViewGroup) scroll).getChildAt(j);
for (int k = 0; k < ((ViewGroup) relative).getChildCount(); k++) {
View gridItem = ((ViewGroup) relative).getChildAt(k);
gridItem.setOnFocusChangeListener(new itemFocusChangeListener());
}
}
}
但是,在ViewPager中,是通过viewPager.setAdapter(new MyViewPagerAdapter());把几个布局文件以list的形式绑定到里面,求各位大神支招,遍历viewPager的方法
补充:移动开发 , Android