Hi,
I use a Listview with the TwoLinesLayout setting:
First line in yellow, second in white ... looks good.
But now I was asked, if I can change the color of the first line per lable depending on values of the data ...
if fieldX="1" then first line in RED
if fieldX="0" then first line in BLUE
if fieldXS"2" then first line in GREEN
Rest in yellow ...
Is there a way to do this ?
I use a Listview with the TwoLinesLayout setting:
B4X:
lvListeGE.Clear
lvListeGE.Color = Colors.DarkGray
lbl2 = lvListeGE.TwoLinesLayout.SecondLabel
lbl2.TextColor = Colors.White
lbl1 = lvListeGE.TwoLinesLayout.Label
lbl1.TextColor = Colors.Yellow
lbl1.TextSize = lbl2.TextSize
...
sLabel1 = ... sStatus & ...
sLabel2 = ... " " & cur.GetString("GeraeteNr") ...
lvListeGE.AddTwoLines2( sLabel1,sLabel2, cur.GetString("sMiGeNr") )
First line in yellow, second in white ... looks good.
But now I was asked, if I can change the color of the first line per lable depending on values of the data ...
if fieldX="1" then first line in RED
if fieldX="0" then first line in BLUE
if fieldXS"2" then first line in GREEN
Rest in yellow ...
Is there a way to do this ?