Judul : How to load a list of images from assets in Android
link : How to load a list of images from assets in Android
How to load a list of images from assets in Android
How to load a list of images from assets in Android
private List<String> getImage(Context context) throws IOException
{
AssetManager assetManager = context.getAssets();
String[] files = assetManager.list("image");
List<String> it=Arrays.asList(files);
return it;
}
Step 1: Create a List<String> listPhoto
Step 2: Create Array String
private String [] images;
Step 2: Create function getData()
private void getData(){
try {
images =getAssets().list("image");
} catch (IOException e) {
e.printStackTrace();
}
listPhoto = new ArrayList<String>(Arrays.asList(images));
}
That's the articleHow to load a list of images from assets in Android
You are now reading the articleHow to load a list of images from assets in Android with link addresshttps://inabnonapudyawanabing.blogspot.com/2020/11/how-to-load-list-of-images-from-assets.html
0 Response to "How to load a list of images from assets in Android"
Post a Comment