Search code examples
androidapp-inventor

List changing value from boolean "true" to "3"


So i'm using AppInventor 2, when i load my screen i have passed a list in from a previous screen as the start value for the current screen

enter image description here

Here we can see that the list is set as (true, true, 1,0,0,0) which is what it's supposed to be but when i try to edit it in the next screen:

enter image description here

can anyone shed some light on what is happening here???


Solution

  • use the select list item block to select an item from a list
    enter image description here

    the index in list block will give you the index of a specific thing in a list... the thing you are looking for is 1, so the result is 3 in your example

    see also the documentation http://appinventor.mit.edu/explore/ai2/support/blocks/lists.html#selectlistitem