Can anyone give me an idea of how to assemble a list, such as items that are within separate grazing? Example:
folder1: files1 and files2 folder2: files3 and files4
the list would look like: files1 files2 files3 files4
The list I have is as follows:
File home = new File(MEDIA_PATH);
if (home.listFiles(new FileExtensionFilter()).length > 0) {
for (File file : home.listFiles(new FileExtensionFilter())) {
HashMap<String, String> song = new HashMap<String, String>();
song.put("songTitle", file.getName().substring(0, (file.getName().length() - 4)));
song.put("songPath", file.getPath());
// Adding each song to SongList
songsList.add(song);
}
}
// return songs list array
return songsList;
}