Sub ChangeListViewColors(LVColor As Int, L1Color As Int, L1TextColor As Int, L2Color As Int, L2TextColor As Int)
Dim l, t, w, h As Int
Dim ta As Object
'get the current properties
l = ltvTest.left
t = ltvTest.Top
w = ltvTest.Width
h = ltvTest.Height
ta = ltvTest.Tag
'remove and add again the ListView
ltvTest.RemoveView
Dim ltvTest As ListView
ltvTest.Initialize("ltvTest")
Activity.AddView(ltvTest, l, t, w, h)
ltvTest.Tag = ta
'set the colors
ltvTest.Color = LVColor
ltvTest.TwoLinesLayout.Label.Color = L1Color
ltvTest.TwoLinesLayout.Label.TextColor = L1TextColor
ltvTest.TwoLinesLayout.SecondLabel.Color = L2Color
ltvTest.TwoLinesLayout.SecondLabel.TextColor = L2TextColor
FillListView 'routine that fills the ListView
End Sub