I'm trying to populate an array with files in my raw folder. I then pick a random slot in that array and use it to play that file.
But when I do this, every slot seems to contain whatever was the final video in the array. I'm not sure what the cause of this is...
var videos = Array(5){R.raw.c0; R.raw.c1; R.raw.c2; R.raw.c3; R.raw.c4};
videoView.setVideoPath("android.resource://" + getPackageName() + "/" + videos[Random.nextInt(0, 4)])
videoView.requestFocus()
videoView.start()