iOS Question Can I change height of items in iTableView?

Binary01

Member
Licensed User
Hello,

How can I change height of SingleLine and TwoLines in iTableViews ?

In Listview of B4A I change its' heights as follow

B4X:
    listview1.TwoLinesAndBitmap.ItemHeight = 55dip
    listview1.TwoLinesAndBitmap.Label.Height = 30dip
    listview1.TwoLinesAndBitmap.SecondLabel.Height = 20dip
My b4i tableview code is as follow:

B4X:
Private Sub pg_Resize(Width As Int, Height As Int)
    TableView1.Initialize("TableView1", False)
    pnSong.AddView(TableView1,0dip,0dip,100%x,100%y)

    Dim img As Bitmap = LoadBitmap(File.DirAssets, "icon.png")
    For i = 1 To 50
        TableView1.AddSingleLine("Item #" & i)
 
        Dim tc As TableCell = TableView1.AddTwoLines("First Line", "")
        tc.Bitmap = img
        tc.IndentationLevel =0
        Dim ColoredTitle As AttributedString
        ColoredTitle.Initialize("second line ", Font.CreateNew2("AK01",26), Colors.Black)
        tc.DetailText = ColoredTitle
    Next
End Sub
TableCell.CustomView may define its height. But I do not want to use it.

Thanks
 

Attachments

Last edited:
Top