Unless there's a way to retrieve the old index of the elements after they've been shuffled, I'd do it one of two ways:
A) Make another list multi_shuffler = [0, 1, 2, ... , file.size()] and shuffle it. Loop over it to get the order for your shuffled file/image lists.
ArrayList newFileList = new ArrayList(); ArrayList newImgList = new ArrayList(); for ( i=0; i
or B) Make a StringWrapper class to hold the file/image names and combine the two lists you've already got into one: ArrayList combinedList;