S SpaceCow Member Licensed User Longtime User Dec 8, 2011 #1 Hi, I'm parsing a XML to a listview and i want some of the rows in a different color. At the moment i am using this: Code: If Name = "curRun" Then If runClosed = "1" Then ListView1.TwoLinesLayout.Label.TextColor = Colors.Red Else ListView1.TwoLinesLayout.Label.TextColor = Colors.White End If ListView1.AddTwoLines(title, subTitle) End If But now everything returns in red! In the logs i can see that only one row (the last) has to be red. How comes? Thanks!
Hi, I'm parsing a XML to a listview and i want some of the rows in a different color. At the moment i am using this: Code: If Name = "curRun" Then If runClosed = "1" Then ListView1.TwoLinesLayout.Label.TextColor = Colors.Red Else ListView1.TwoLinesLayout.Label.TextColor = Colors.White End If ListView1.AddTwoLines(title, subTitle) End If But now everything returns in red! In the logs i can see that only one row (the last) has to be red. How comes? Thanks!
eps Expert Licensed User Longtime User Dec 8, 2011 #2 Everything in a Listview is the same colour. If you want different colours you have to either use a cunning ListView workaround or ScrollViewList (a bit of a pita tbh!!) see here : http://www.b4x.com/forum/basic4android-updates-questions/12634-scrollview-performance.html#post71217 So define one which is WithBitmap and One without, they can have different colours etc.. from each other. Upvote 0
Everything in a Listview is the same colour. If you want different colours you have to either use a cunning ListView workaround or ScrollViewList (a bit of a pita tbh!!) see here : http://www.b4x.com/forum/basic4android-updates-questions/12634-scrollview-performance.html#post71217 So define one which is WithBitmap and One without, they can have different colours etc.. from each other.