Hi, I've got strings in a listview that I'd like to roll back (undo)
I've kind of got the figured out- works well.
B4X:
listview1.RemoveAt(listview1.size -1)
I've also set up lists to individually hold individual temp items from that string...
B4X:
' remove last entry from temp list
tempp1score.RemoveAt(tempp1score.size -1)
'assign the last item from temp to current score
player1score = tempp1score.Get(tempp1score.size -1)
I get ArrayindexarrayoutofboundsExecption: length=12; index = -1
Maybe I've just got to use a condition not to exceed the index?
Instead of using the SIZE you should be using the POSITION, I'm assuming that you are removing the item in the ItemClick event, if not, then save the position in a Global variable.