Created
June 15, 2018 06:45
-
-
Save valentincognito/e25e8d439750a0c39d076d830e294668 to your computer and use it in GitHub Desktop.
Loop through a Layout view to access all children
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment