When the last line of the ListView is clicked, application is closed

Please show your relevant blocks

on any listview the same problem

Please show what you are doing in the afterPicking event....

All other lines work fine, but when I click on the last line, the application closes automatically.

Try this simple test:

Also try removing everything from your afterPicking event. Does the app still crash?

How are you testing, compiled apk or with companion app (is your version up to date - 2.68 / 2.68u)?

1 Like

Show how global optionsList is tracking the ListView Elements list.

Is it shorter?

1 Like

Also, is your Quit button just under the list view?

2 Likes

When I test on the companion, everything works fine, when I output the file to the apk on the last line of the list, it doesn’t even show the selection.

when I click on “1” the notification gives the result 1, when I click on “2” the result is 2, when on “3” the result is 0.

2.68

(Canned Reply: ABG- Export & Upload .aia)
Export your .aia file and upload it here.
export_and_upload_aia

new_porc.aia (1.9 KB)

https://ai2-test.appinventor.mit.edu/ - not working
https://ai2.appinventor.mit.edu/ - working
Why???

Always helps to tell us which server you are using. . .

You may have tripped a bug on the test server, though :confused:

@ewpatton

Note that the ai2-test server is for testing features of the next release, and should not be used for developing apps.

1 Like

I have confirmed the SelectionIndex = 0 bug on the last Element of the ListView on ai2-test under Companion 2.68t3u.
image

image

new_porc.aia (1.9 KB)
SelectionIndex bug

@ewpatton

Thanks for the report. We are looking into it.