如何创建文件夹并访问子文件夹中的图像

时间:2020-02-15 13:16:52

标签: android android-studio subdirectory

Emote_stickers现在是主文件夹,它列出了该列表中的所有图像。我想在其中创建子文件夹,说“ head bow”(其中将包含图像)。current screenshot

try {
            final String[] imgPath = assetManager.list("Emote_stickers");
            sortArray(imgPath, "sticker_");

            for (int j = 0; j < imgPath.length; j++) {

                InputStream is = assetManager.open("Emote_stickers/" + imgPath[j]);
                Drawable drawable = Drawable.createFromStream(is, null);

                StickerModel stickerModel = new StickerModel();
                stickerModel.setDrawable(drawable);
                list.add(stickerModel);


            }


        }

0 个答案:

没有答案