Hi,
I have a fullsize panel with anchors (panelMain) which I resize. This works.
In the panelMain, I have 2 panels with anchors . Panel 2 on the right sight with the buttons (screenshot) is only shown a part
after resize. (screenshot 2)
What can I do ?
B4X:
Sub B4XPage_Resize (Width As Float, Height As Float)
Dim r As Rect = B4XPages.GetNativeParent(Me).SafeAreaInsets
PanelMain.SetLayoutAnimated(0, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
End Sub
You need to create a separate layout with the menu items and load them to Root1. Or add it programmatically:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
#if B4A or B4J
Root = Root1
#else if B4i
Root = xui.CreatePanel("")
Root1.AddView(Root, 0, 0, Root1.Width, Root1.Height)
Dim bb As BarButton
bb.InitializeText("Setup", "Setup")
B4XPages.GetNativeParent(Me).TopRightButtons = Array(bb)
#end if
Root.LoadLayout("MainPage")
End Sub
Private Sub B4XPage_MenuClick (Tag As String)
Log(Tag)
End Sub