Android Question ListView linr no change TextColor

pamoxi

Member
Licensed User
Longtime User
In the next sample code,
Why the listview text not change the color?
Allways the TextColor is white.

Code:

Dim listac As ListView
Dim lbl As Label
Dim txt As String
lbl = listac.SingleLineLayout.Label

For f = 0 To 9

If f=5 or f=8 Then
txt = "this is red"
lbl.TextColor = Colors.Red
Else
txt = "this is white"
lbl.TextColor = Colors.White
End If

listac.AddSingleLine2(txt, f)

Next
 

DonManfred

Expert
Licensed User
Longtime User
With a listview you only can set a layout
FOR ALL Singleline-Items
FOR ALL Twoline-items
FOR ALL Twolineandbitmap-Items

You can noch change it row per row!

If you need to change you should consider using a CustomListView instead. Here you can do what you want with earch item.
 
Upvote 0
Top