is it safe to access UI such as listview in Newdata available directly ?
i know it is asynchronize i am asking this because i have tried to update UI inside NEWdata
and the phone freeze while adding items to Xcustomelistview i am adding about 100 items
thats how new data looks like
B4X:
Public Sub NewData (data() As Byte)
Dim msg As String
msg = BytesToString(data, 0, data.Length, "UTF-8")
Dim param As String = msg
Dim paramnum() As String = Regex.Split("\~", param)
For i = 0 To paramnum.Length-1
XVIWLST.Add(CreateListItem(paramnum(i), XVIWLST.AsView.Width, 50dip), paramnum(i))
Next
End Sub
Dim p As Panel
p.Initialize("")
p.SetLayout(0, 0, Width, Height)
p.LoadLayout("cellitem")
itemlabel.Text = text
image1.Bitmap = LoadBitmap(File.DirAssets, "1.png")
image2.Bitmap = LoadBitmap(File.DirAssets, "2.png")
image3.Bitmap = LoadBitmap(File.DirAssets, "3.png")
End If
Return p