android app loop through all objects in layout code example
Example: 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
}