Android Question Array in List

epiCode

Active Member
Licensed User
B4X:
    memtable is list storing array at location Index
  
    Dim StrArr() As List = memtable.get(Index)
  
    lbheading.Text=StrArr(vheading) <-- causes java.lang.RuntimeException: Method: Get not found in: java.lang.Integer
  
    vheading is integer with value 5
however watch expression StrArr(vheading) gives correct string in debug
What am I doing wrong? how else can we set label.text to item from array in list ?
 

epiCode

Active Member
Licensed User
StrArr ist a list (not a simple array). So you need to use the get method to get a value from it:

B4X:
lbheading.Text=StrArr.get(vheading)
there is no get method available. it shows only .length available
 
Upvote 0
Top