java - Making a user pick first item in a ArrayList -
i have items in array list need check matches.
the matches in array list in order should called user.
for example.. red, green,orange. in array list in order user should match then.
the problem cant figure out how make user call items in order appear.
right here how trying no avail..
//here try check see order being clicked matches 1 item less array list size. if(this.getuserdata() == manager.getinstance().currentlist.get(size-1)){ //here produce ingredient since matches item in list. producesquare(); activity.runonuithread(new runnable(){ @override public void run() { toast.maketext(activity, "match", toast.length_long).show(); } }); //if order matches item in array list, remove item. manager.getinstance().currentlist.remove(size-1);
this isnt working. right now, if have 2 items need matched, second item has clicked before first one..i want other way around. meaning first item in list must called before last item.
any ideas?
seems broken code makes user click in reverse order. need change
currentlist.get(size-1) currentlist.remove(size-1)
to
currentlist.get(0) currentlist.remove(0)
to make user click in order.
Comments
Post a Comment