i have a simple layout, a label with anchors in both directions
I load this layout to a panel.
Then i change the panel height per code, but the label is not resizing.
This is the code to get the panel:
B4X:
Public Sub BodyPanel As B4XView
Return xpnl_card_body
End Sub
and with this code i load the layout to the panel:
This code is wrong and hints that your component design is also wrong. The layout should be loaded from inside the class. Otherwise the events will not be handled in the class.
thats a problem, because i have 2 sizes: Half Expanded and Full Expanded.
Maybe i should to force the user to load 2 layouts for the 2 heights, the layout can be the same, but the height is different.
That's not the problem, my problem is this:
Half expanded and full expanded
The first mode is half, the layout is resized for the half size, if the user drag it to top, then the layout height must be bigger