iOS Question CustomListView AddTextItem's text disappears

db0070

Active Member
Licensed User
Longtime User
I have a CustomListView to which I am adding a number of text items. When I load a background image my text disappears. How do I make the text Tone1, Tone2 etc to come to the front of the loaded image?
In B4A I am able to set the background image and the text appears overlayed on the background.

B4X:
'Private clv1 As CustomListView - defined in the designer
   
    clv1.AddTextItem("Tone1",0)
    clv1.AddTextItem("Tone2",1)
...

Sub clv1_ItemClick (Position As Int, Value As Object)
    Dim s As String
    Dim pnl As Panel
    Dim i As Int

    For i = 0 To clv1.GetSize -1 'reset all the items in clv1 list
        pnl = clv1.GetPanel(i)
        'pnl.Color = Colors.Transparent
        pnl.LoadLayout("NotSelectedLayout") 'NotSelectedLayout is a layout with an ImageView loaded with an image
        'pnl.SetBackgroundImage(bg1)  'for B4A
        'pnl.SendToBack '- this did not work
    Next
    pnl = clv1.GetPanel(Position)
    pnl.LoadLayout("SelectedLayout")  'load the clicked item
End Sub
[code]
 
Top