Hi everyone! I have a customlistview loaded with panels that have three labels in them.
How do I update the text of each label in the panel?
This is the method i used to populate the list view:
How do I update the text of each label in the panel?
This is the method i used to populate the list view:
B4X:
For k = 0 To response.Size - 1
Dim op As alpacaPosition = response.Get(k)
Dim p As Panel
p.Initialize("")
p.SetLayout(0, 0, CustomListView2.AsView.Width, 75dip)
p.LoadLayout("Item")
lbl_symbol.Text = op.symbol & " (" & NumberFormat2(op.currentPrice,1,2,2,True) & ")"
'Check if there is a loss
If IsNegative(op.unrealizedIntradayPL) Then
lbl_profit_loss.Text = "$(" & NumberFormat2(op.unrealizedIntradayPL,1,2,2,True) & ")"
p.Color = xui.Color_Red
Else
lbl_profit_loss.Text = "$" & NumberFormat2(op.unrealizedIntradayPL,1,2,2,True)
p.Color = xui.Color_Green
End If
lbl_Qty.Text = NumberFormat2(op.quantity,1,2,2,True)
CustomListView2.Add(p,op.symbol)
Next