I have changed fam.addMenuButton(btn1) to fam.addMenuButton2(btn1, 1), and use
B4X:
Sub showListIndex
For k = 0 To FABs.Size - 1
FABs.Get(k)
Log("List indexes = " & k)
Next
If k = 3 Then
Label1.Text = "333"
Else If k = 4 Then
Label1.Text = "444"
Else
Label1.Text = ":bangHead"
End If
End Sub
to Log List1 indexes.
What is the way to get the index and use the index to update Label1?
my question probably is:
How do i get the index number from this method, 'AddMenuButton2(fab As FloatingActionButton, index As Int)' when clicking each fab?
Or is there a tutorial on this kind of method which has "index" as the second arg?