Hello.
i need set different color in the second line of listview by a string value thant i read.
i have try with IF circle, and select case.
The code work correct only in i stop the code with break.
the code that i use is:
the result shoud be as the attached image, but it work only with "break" active.
Thanks you
i need set different color in the second line of listview by a string value thant i read.
i have try with IF circle, and select case.
The code work correct only in i stop the code with break.
the code that i use is:
B4X:
Dim colorestringa As String = stringArray(6)
Select True
Case colorestringa = "2"
Log("Il Valore era 2")
ListView1.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.Cyan
ListView1.AddTwoLinesAndBitmap2(lvd.FirstRow,lvd.SeconRow,lvd.Picture,lvd)
Case colorestringa = "0"
Log("Il Valore era 0")
ListView1.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.Yellow
ListView1.AddTwoLinesAndBitmap2(lvd.FirstRow,lvd.SeconRow,lvd.Picture,lvd)
Case colorestringa = "1"
Log("Il Valore era 1")
ListView1.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.Green
ListView1.AddTwoLinesAndBitmap2(lvd.FirstRow,lvd.SeconRow,lvd.Picture,lvd)
End Select
B4X:
if stringArray(6) = "0" then
ListView1.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.Green
else if stringArray(6) = "1" then
ListView1.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.yellow
else
ListView1.TwoLinesAndBitmap.SecondLabel.TextColor = Colors.Cyan
end if
the result shoud be as the attached image, but it work only with "break" active.
Thanks you