I looked through the Variables & Objects in Basic4android documents
The code line:
arr = List1.Get(0) 'get the first item from the list
does not use an index for arr.
Is arr still the array variable? If so which index is receiving the data?
B4X:
Dim arr(3) As Int 'This call is redundant in this case.
Dim List1 As List
List1.Initialize
For i = 1 To 5
Dim arr(3) As Int
arr(0) = i * 2
arr(1) = i * 2
arr(2) = i * 2
List1.Add(arr) 'Add the whole array as a single item
Next
arr = List1.Get(0) 'get the first item from the list
Log(arr(0)) 'Will print 2
The code line:
arr = List1.Get(0) 'get the first item from the list
does not use an index for arr.
Is arr still the array variable? If so which index is receiving the data?
Last edited: