问题
I have some media file in my asset folder. I want to get all media files names and files count from my asset folder.
回答1:
A little googling might have helped you!
try this:
AssetManager assetManager = getAssets();
String[] files = assetManager.list("your_folder_name_inside_assets");
List<String> it = new LinkedList<String>(Arrays.asList(files));
来源:https://stackoverflow.com/questions/22861480/how-to-get-file-name-and-file-count-from-asset-folder-in-android