Hi,
It's the first time I used LoadLayoutArray and I cannot make it working.
I do like this:
B4X:
Dim i As Int
For i=0 To 10
Dim elt As BANanoElement = SKContainer1.Element
Dim index As Long = elt.LoadLayoutArray("myItem", False)
Dim views As Map = BANano.GetAllViewsFromLayoutArray(Me, "myItem", index)
Dim lbl As SKLabel = views.Get("sklabel1")
lbl.Text = "Label " + index
Dim btn As SKButton = views.Get("skbutton1")
btn.Text = "Button " + index
Next
About point 2. It is allowed, but by setting the SKLabel1 text later in code, you do overwrite the existing innerHTML (containing the button). This is because the SKLabel1 uses the .html() instead of .text(). I use .html() because you can add formatting to the text, which is done in html.
About point 2. It is allowed, but by setting the SKLabel1 text later in code, you do overwrite the existing innerHTML (containing the button). This is because the SKLabel1 uses the .html() instead of .text(). I use .html() because you can add formatting to the text, which is done in html.
My bad, I should have noticed it. Thank you so much. I will put a span for exemple int it and set the text of this span insted of setting html of the label.
Again thank you.