Android: how to display images in ImageSwitcher

I have an array of files contained in sdcard: I would like to show the element in ImageSwitcher, but could not find SetImageBitmap, but only SetImageResource, but I do not have them in the res folder. How can i do this?

0
source share
1 answer

use this code below instead of setImageBitmap. I think you have the files in the array.

imgSwitcher.setImageURI(Uri.fromFile(filename)); 
+3
source

Source: https://habr.com/ru/post/897361/


All Articles