iOS Question [SOLVED] B4XDrawer autoscale issue.

techknight

Well-Known Member
Licensed User
Longtime User
I am using B4XDrawer in my app which worked fine with my simple layout without any major issues.

But, With my more complex layout, I am getting scaling issues.

If the layout is open in B4i-Bridge, it looks ok. seems to be scaled ok.

But when I load it in B4X drawer in my App, its all oversized and jumbled layered on top of one other and I cant quite figure out whats going on with it. Android everything works fine, but I know iOS is different.

I am using an iPad Mini which it looks decently ok on, and an older iPod touch which seems to be the biggest issue, that and phones.

Here is my Application Start code, and I attached the layout file.

B4X:
Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    SetNavColors(0xFF0098FF)
    SetTitleColor(Nav, Colors.White)
    Page1.Initialize("Page1")
    Page1.RootPanel.LoadLayout("RootPanel")
    Page1.RootPanel.SetBorder(0, 0, 0)
    Page1.RootPanel.Color = Colors.Black
    Page1.Title = "Football Scorekeeper" & Common.AppVersion
    Drawer.Initialize(Me, "drawer", pnlRoot, 275dip)
    'SwitchPage(1)
    Drawer.CenterPanel.LoadLayout("fblarge")
    Drawer.LeftPanel.LoadLayout("left")
    NavControl.ShowPage(Page1)
    NavControl.ToolBarVisible = False
    NavControl.NavigationBarVisible = True
    Dim bb As BarButton
    bb.InitializeBitmap(KeepOriginalColors(LoadBitmapResize(File.DirAssets, "hamburger.png", 32dip, 32dip, True)), "hamburger")
    Page1.TopLeftButtons = Array(bb)
    SetMenuItems(False, 0)

    'Build Left Menu Items
    BuildLeftMenu
 
    'Declare Fonts
    lblGuest.Font = Font.CreateNew2("Digital-7", 30)
    lblHome.Font = Font.CreateNew2("Digital-7",30)
    lblPeriod.Font = Font.CreateNew2("Digital-7",30)
    lblTime.Font = Font.CreateNew2("Digital-7",36)
    ScoreEngine.TimeOfDay = False

    'Load Dialogs
    dialog.Initialize(Page1.RootPanel)
'    dialog.Title = "Input Dialog Example"
 
    'Read in the game save configuration file
    CheckConfig
    ReadConfig

    'Keep the device alive
    App.IdleTimerDisabled = True

End Sub

Any thoughts?
 
Last edited:

techknight

Well-Known Member
Licensed User
Longtime User
The issue was the pnlRoot from the Iphone X safe area example, I had to fix the autoscale rate and variant on that to match that of my main layout and all is well.
 
Upvote 0
Top