Arraylist

22 views
Skip to first unread message

rein ahne

unread,
Oct 28, 2015, 1:02:54 AM10/28/15
to JavaFXAndroid
hi,

Question,

I have a arraylist filled with strings of  urls.

i want to show them like this.

ArrayList<String> urlarray = new ArrayList<>();  
Imageview view = new Imageview();
 view.setImage(new Image(urlarray.get(1)));
   root.getChildren().add(view);

 it works fine on my pc....but my android phone doesnt like it  :-)

if i do this it works fine    >>  view.setImage(new Image("http://www.canon.nl/Images/Android-logo_tcm16-1232684.png");    

what is the problem ?   is it not possible to use an arraylist?

(netbeans gluon)

greeting janoz

Даниэль Циммерманн

unread,
Oct 30, 2015, 9:18:58 AM10/30/15
to JavaFXAndroid
Your example-list is empty, yet you try to fetch the second item (arrays, lists and so on in Java normally starts with "0" and not "1"). So I simply guess: You get an IndexOutOfBoundsException... Please check that.
Reply all
Reply to author
Forward
0 new messages