I'm trying to load images to an array and can't figure out the syntax. I'm used to something like this in C#:
picture.Image = Image.FromFile(fileLocation);
That doesn't work here. Can anyone help me with this syntax, and any applicable imports I need to make. This is what I have:
public class Beards extends ActionBarActivity
{
Image [] beard = new Image[20];
String [] beardLocation = new String [20];
public void fillArrays()
{
for (int i = 0; i < 20; i++)
{
beardLocation[i] = "C:/Users/geoffoverfield01/AndroidStudioProjects/TheBeadery2.0/Images/Beards/pic_" + i + ".jpg";
}
for (int x =0;x<20;x++)
{
beard[x] = ImageIO.read(new File(beardLocation[x])); }
}
...
}
The library that allows me to use the ImageIO won't load.