I have a PnlRoot that contains the main layout and the resize event works fine with IphoneX
B4X:
Private Sub PageMain_Resize(Width As Int, Height As Int)
Dim r As Rect = PageMain.SafeAreaInsets
PnlRoot.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
End Sub
But when I add the code to implement the B4XDrawer (based on this tutorial), I have a wrong graphics behaviour.
It seems the Drawer.Centerpanel that contains the main layout doesn't shift correctly so I see two layout one over the other and with different offsets
Where I'm wrong ?
I tried this
B4X:
Private Sub PageMain_Resize(Width As Int, Height As Int)
Dim r As Rect = PageMain.SafeAreaInsets
Drawer.Resize(Width - r.Right - r.Left, Height - r.Bottom - r.Top)
PnlRoot.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
End Sub
Well, it depends on what you have decided to show in the corner ....
For my layout I prefer the rootpanel is shrinked to fit the safe area.
I realize I can lower the widht of the drawer not to occupy the right rounded corner area, but I can't shift left the drawer not to occupy the left notch and I have instead to shift right the graphics in the drawer.leftpanel
After one weeks of attempts my personal conclusion (without anybody feels offended) is that I don' like the drawer as it behaves in B4i. Also it is missing the drawer.rightpanel that would complete this solution. It was present in the older sliding panels (but it was suggested to me to switch to B4xDrawer). Better (for me) to use a simple anotherpage.show without troubles ..... the animation is similar to that one of the drawer.
Thank you very much for your support
I took the original B4XDrawer code from @Erel and modified it to create a new view. This view supports right panel in B4A and B4I. What was often requested. I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of...