Android Question Different background colors for odd/even rows in ListView

vecino

Well-Known Member
Licensed User
Longtime User
Hello, is it possible?
I have seen this same question for B4J, but I don't know if it is possible to implement it for B4A.
Thank you.
 
Upvote 0
Never. No good reason.

xCLV is cross platform, more powerful and easier to work with.
If you add simple text items:
Code: Copy
Dim clrs() As Int = Array As Int(xui.Color_LightGray, xui.Color_White)
For i = 0 To 99
    CustomListView1.AddTextItem("Item #" & (i + 1), "")
    CustomListView1.GetPanel(i).Color = clrs(i Mod 2)
Next
 
Upvote 0
A doubt.
I already use CustomListView in some cases, does this xCustomListView replace the CustomListView?
Can I use both at the same time?
So I don't have to rewrite the code I use with CustomListView, or are they compatible?
Thank you.
 
Upvote 0
You cannot use them together. xCustomListView replaced CustomListView. It shouldn't be too difficult to switch from the old CLV to the newer xCLV. You will need to remove the CLV from the layout and add it again.
Note that xCLV is also named CustomListView in the IDE.
Yes, that's why I had the doubt, because they have the same name.
Thank you.
 
Upvote 0
Back
Top