Sub SetLVHeights4TextSize(LV As ListView, TwoLine As Boolean, Text1Size As Float, Text2Size As Float, Padding As Float, Lblcol As Int, Txtcol As Int)
If TwoLine = True Then
LV.TwoLinesLayout.Label.Top = 0
LV.TwoLinesLayout.Label.Color = Colors.Blue
LV.TwoLinesLayout.Label.TextColor = Colors.Cyan
LV.TwoLinesLayout.Label.TextSize = Text1Size
LV.TwoLinesLayout.Label.Height = (Text1Size + (2 * Padding)) * Density
LV.TwoLinesLayout.SecondLabel.Top = LV.TwoLinesLayout.Label.Height
LV.TwoLinesLayout.SecondLabel.Color = Colors.Blue
LV.TwoLinesLayout.SecondLabel.TextColor = Colors.Cyan
LV.TwoLinesLayout.SecondLabel.TextSize = Text2Size
LV.TwoLinesLayout.SecondLabel.Height = (Text2Size + (2 * Padding)) * Density
LV.TwoLinesLayout.ItemHeight = LV.TwoLinesLayout.Label.Height + LV.TwoLinesLayout.SecondLabel.Height
LV.TwoLinesLayout.Label.Gravity = Gravity.CENTER_VERTICAL
LV.TwoLinesLayout.SecondLabel.Gravity = Gravity.CENTER_VERTICAL
Else
LV.SingleLineLayout.Label.Top = 0
LV.TwoLinesLayout.Label.Color = Colors.Blue
LV.TwoLinesLayout.Label.TextColor = Colors.Cyan
LV.SingleLineLayout.Label.TextSize = Text1Size
LV.SingleLineLayout.Label.Height = (Text1Size + (2 * Padding)) * Density
LV.SingleLineLayout.ItemHeight = LV.SingleLineLayout.Label.Height
LV.SingleLineLayout.Label.Gravity = Gravity.CENTER_VERTICAL
End If
End Sub