I have a lot of files in /res/raw. Is there some way to organise this folder? Simply arranging into directories makes them invisible to R.raw.
Asked
Active
Viewed 3,442 times
2 Answers
15
Sub-directories are not allowed within the Android resource folders. It is certainly inconvenient.
Previously discussed: Can the Android drawable directory contain subdirectories?
-
That's a pretty conclusive answer! Thanks. – Jim Apr 06 '11 at 19:54
1
Assets
Especially if you don't need a reference in your R class, (and no internationalization) use the assets folder.
InputStream inStream = getAssets().open("subfolder/filename.txt");
BufferedReader reader = new BufferedReader(new InputStreamReader(inStream));
It is meant to be on the same level as your res
/java
folder: src/main/assets/
Since you asked for the raw
folder, there is a good chance this is what you want to use anyways.