valentincognito
6/15/2018 - 6:45 AM

Layout child iteration

Loop through a Layout view to access all children

GridView myLayout = findViewById(R.id.myLayoutId);

for (int i = 0; i < myLayout.getChildCount(); i++) {
    // Int our case the gridView contains videos
    VideoView v = (VideoView) myLayout.getChildAt(i);
    // Start the video
    v.start();
}