Changing Colors in Second Line ListView

virpalacios

Active Member
Licensed User
Longtime User
Hi All, I have a small issue with my Android App,
I tried to set the second line in my listview to green color (all lines in my list) using this script
(inside a button), however just line number
0,1, 8,9,10 get green color.
---------------------------------------------------------------
Dim Label1 As Label
For i = 0 To 10
ListView1.SetSelection(i)
ListView1.TwoLinesLayout.SecondLabel.TextColor = Colors.Green
Next
--------------------------------------------------------------------
Thanks in Advance for your help
:signOops:
 

klaus

Expert
Licensed User
Longtime User
You cannot change the layout after having populated the ListView, you must do it before.
The layouts are valid for ALL lines in the ListView, you cannot change them individually.
If you need to, you should use a ScrollView instead which is much more versatile. You could have a look at at ScrollView examples summary.

Best regards.
 
Upvote 0

virpalacios

Active Member
Licensed User
Longtime User
ListView Issue - Thanks for your promptly help

:sign0142:
Thank you Klaus to the information, I will follow your advise on ScrollView.

Best Regards

Virgilio from Panama
 
Upvote 0
Top