How can I get an int from a file?
AssetManager am = getApplicationContext().getAssets(); String[] files = am.list("my_images"); ArrayList<Drawable> drawables = new ArrayList<>(); for (String file : files) { showLog(file); Drawable d = Drawable.createFromStream(am.open("my_images/" + file), null); drawables.add(d); iconsList.add(тут нужно добавить значение int от drawable d); } Tried to do so, but did not help, always returns 0
Resources resources = getApplicationContext().getResources(); final int resourceId = resources.getIdentifier(file, "drawable", getApplicationContext().getPackageName()); How correctly understood 0 because file is in asset/my_images how to get it?
So I tried too 0
Resources resources = getApplicationContext().getResources(); final int resourceId = resources.getIdentifier(file, "asset/my_images", getApplicationContext().getPackageName());