Android Question B4XTable loading a layout file into a custom cell

PhiloSophical

Member
Licensed User
Longtime User
Thank you problem solved. I had got .BuildLayoutsCache before .SetData somehow - correct code sequence example below for reference - taken from Erel's B4J chart example



B4X:
    B4XTable1.SetData(data)
    B4XTable1.MaximumRowsPerPage = 10
    B4XTable1.BuildLayoutsCache(10)
    For i = 1 To GraphColumn.CellsLayouts.Size - 1
        Dim p As B4XView = GraphColumn.CellsLayouts.Get(i)
        Dim Base As B4XView = xui.CreatePanel("")
        p.AddView(Base, 2dip, 2dip, GraphColumn.Width - 4dip, B4XTable1.RowHeight - 4dip)
        Base.LoadLayout("ChartCell")
        If i Mod 2 = 0 Then
            xChart1.ChartBackgroundColor = B4XTable1.OddRowColor
        Else
            xChart1.ChartBackgroundColor = B4XTable1.EvenRowColor
        End If
        Base.Tag = xChart1
    Next
 
Upvote 0
Top