android loop through all objects in layout code example
Example 1: android studio loop through all objects in layout
for(int i=0; i<myGridView.getChildCount(); i++) {
TextView child = (TextView)mGridView.getChildAt(i);
// do stuff with child view
}
Example 2: android java loop through all objects in layout
for(int i = 0; i < myGridView.getChildCount(); i++) {
TextView child = (TextView) mGridView.getChildAt(i);
// do stuff with child view
}