Do not tell me how to get the absolute paths to the files that are located in the assets / images folder?
1 answer
Why do you need an absolute path? AssetManager will find the file itself. You just give him a name:
AssetManager assetManager = context.getResources().getAssets(); InputStream stream = assetManager.open(Constants.IMG_FOLDER+imgFileName);
In this case, the value of Constants.IMG_FOLDER = "image /". Try and accomplish your goal.
- Actually, I'm trying to remake this - kreotiv.ru/ImageViewFlipper.zip At the moment, there is a collection and display of pictures from the SD card, and I want to make it show the files from assets / images. I would appreciate any help - androider
- I wrote you a sample code. If you have specified file names by loop, substitute them into the open () method. If you have undefined file names, call the method assetManager.list ("images /") and it will return the list of files to you. - DroidAlex
|