Hi
I have a xCustomlistview which I want to put in a Material ICON. I have managed to display it but i have to repeat the code twice for it to display correctly or it just displays a small square box, As can been seen in the code below.
I also need to find one of the Rows and change the Material Icon. the only way I can find out how to do it is to loop thru all the records until I get the one that matches my variable which is the Value.
This does take time and I do not want to refresh the list all the time. With only a few records in this is , it is not a problem. But when I add 20 records with Pictures . to display it slows down quite quickly.
If there could be a command like clv.GetIndex(Value) would be perfect. If i could click the row in the list I would use CLV_ItemClick
Thank you
I have a xCustomlistview which I want to put in a Material ICON. I have managed to display it but i have to repeat the code twice for it to display correctly or it just displays a small square box, As can been seen in the code below.
I also need to find one of the Rows and change the Material Icon. the only way I can find out how to do it is to loop thru all the records until I get the one that matches my variable which is the Value.
This does take time and I do not want to refresh the list all the time. With only a few records in this is , it is not a problem. But when I add 20 records with Pictures . to display it slows down quite quickly.
If there could be a command like clv.GetIndex(Value) would be perfect. If i could click the row in the list I would use CLV_ItemClick
Thank you
B4X:
Public Sub messagestatus (messagedts As Long, Server As Boolean, Delivered As Boolean, Viewed As Boolean)
For x = 0 To CLV.Size-1
Dim pnl As B4XView = CLV.GetPanel(x)
If messagedts = CLV.GetValue(x) Then
If pnl.NumberOfViews >2 Then
Dim lbl As B4XView=pnl.GetView(2)
If Server = True Then
lbl.Font = fx.CreateMaterialIcons(15)
lbl.SetTextAlignment("BOTTOM","RIGHT")
iv.Text = Chr(0xE876)
lbl.TextColor=Main.xui.Color_DarkGray
lbl.Font = fx.CreateMaterialIcons(15)
lbl.SetTextAlignment("BOTTOM","RIGHT")
iv.Text = Chr(0xE876)
lbl.TextColor=Main.xui.Color_DarkGray
End If
If Delivered = True Then
lbl.Font = fx.CreateMaterialIcons(15)
lbl.SetTextAlignment("BOTTOM","RIGHT")
iv.Text = Chr(0xE877)
lbl.TextColor=Main.xui.Color_DarkGray
lbl.Font = fx.CreateMaterialIcons(15)
lbl.SetTextAlignment("BOTTOM","RIGHT")
iv.Text = Chr(0xE877)
lbl.TextColor=Main.xui.Color_DarkGray
End If
If Viewed = True Then
lbl.Font = fx.CreateMaterialIcons(15)
lbl.SetTextAlignment("BOTTOM","RIGHT")
iv.Text = Chr(0xE877)
lbl.TextColor=Main.xui.Color_RGB(88,199,243)
lbl.Font = fx.CreateMaterialIcons(15)
lbl.SetTextAlignment("BOTTOM","RIGHT")
iv.Text = Chr(0xE877)
lbl.TextColor=Main.xui.Color_RGB(88,199,243)
End If
End If
End If
Next
End Sub
Last edited: