Check out example codes for "android studio loop through all objects in layout". It will help you in understanding the concepts better.
Code Example 1
for(int i=0; i<myGridView.getChildCount(); i++) {
TextView child = (TextView)mGridView.getChildAt(i);
// do stuff with child view
}
Learn ReactJs, React Native from akashmittal.com