Android Question ListView item color

Spectre

Active Member
Licensed User
Longtime User
Hi!
I have a strange behavior of the list view .
When I try to paint the lines in an ad based event I get all the same color .

Best regards, Riccardo




B4X:
        For i =0 To MyCursor1.RowCount - 1
                MyCursor1.Position=i   
                lvie_track.AddTwoLines2(MyCursor1.GetString("tr_Name") & " : " & MyCursor1.GetString("tr_Dett") , " Diff: " & MyCursor1.GetString("tr_Diff")  &  " km: " _
                     & MyCursor1.GetString("tr_Km")  & "  Dist: " & MyCursor1.GetString("tr_Distanza") ,MyCursor1.GetString("tr_Name") )
                If MyCursor1.GetString("tr_Diff") ="FACILE" Or  MyCursor1.GetString("tr_Diff")="FACILISSIMO" Then
                    lvie_track.TwoLinesLayout.SecondLabel.TextColor=Colors.Green
                Else If MyCursor1.GetString("tr_Diff")="MEDIO" Then
                    lvie_track.TwoLinesLayout.SecondLabel.TextColor=Colors.Yellow
                Else If  MyCursor1.GetString("tr_Diff")="DIFFICILE" Then
                    lvie_track.TwoLinesLayout.SecondLabel.TextColor=Colors.red
                Else If  MyCursor1.GetString("tr_Diff")="EXTRASTRONG" Then
                    lvie_track.TwoLinesLayout.SecondLabel.TextColor=Colors.LightGray
                End If
            Next   
        End If
 

Spectre

Active Member
Licensed User
Longtime User
HI!!
I know this. The strange thing is that in debugging ( line by line F8 ) functions . And the rows are of different color. If I prepare a relase no longer works .
 
Upvote 0
Top