java.lang.IndexOutOfBoundsException: index=7 count=0
What is this error really telling me..
I have the exact same code running in a test project with no errors
What is this error really telling me..
I have the exact same code running in a test project with no errors
B4X:
ac1.Initialize("XC")
ac2.Initialize("XC", ac2.VERTICAL)
For i = 1 To 7
Dim ai As AHActionItem
Dim bd As BitmapDrawable
Dim Filename, Text As String
Select i
Case 1
Filename = "menu_up_arrow.png"
Text = "Prev"
Case 2
Filename = "menu_down_arrow.png"
Text = "Next"
Case 3
Filename = "menu_info.png"
Text = "Info"
Case 4
Filename = "menu_eraser.png"
Text = "Delete"
Case 5
Filename = "menu_search.png"
Text = "Search"
Case 6
Filename = "menu_cancel.png"
Text = "Cancel"
Case 7
Filename = "menu_ok.png"
Text = "Ok"
End Select
'Initialize a bitmap drawable and the action item
bd.Initialize(LoadBitmap(File.DirAssets, Filename))
ai.Initialize(i, Text, bd)
ai.Selected = True
'Make the Prev and Next items sticky so they will not close the popup
If i = 1 OR i = 2 Then ai.Sticky = True
'Add the item to both Quickactions popups
ac1.addActionItem(ai)
ac2.addActionItem(ai)
Next