iOS Question TabStrip and LoadLayout in iPhone-X

D

Deleted member 103

Guest
Hi,

with this code I load 3 layouts into a TabStrip.
With iPhone 6+ everything looks right, with iPhone-X you see a red bar, which is probably the status bar.
Is there a way to remove the status bar?

B4X:
Sub Process_Globals
    Private pnlRoot As Panel
    Private ToolBar1 As clsToolBar

    Private TabStrip1 As TabStrip
    Private csb As CSBuilder
    Private page1, page2, page3 As Page
    Private TabPages As List
End Sub

Public Sub Show
    If Not(Main.pOnlineStatistik.IsInitialized) Then
        Main.pOnlineStatistik.Initialize("pOnlineStatistik")
    End If
    Main.pOnlineStatistik.RootPanel.LoadLayout("Main")
    Main.pOnlineStatistik.RootPanel.Color = Colors.White
    pnlRoot.LoadLayout("frmOnlineStatistik")
    Main.NavControl.ShowPage(Main.pOnlineStatistik)

    ToolBar1.Clear
    ToolBar1.UpIndicator = ToolBar1.Indicator_Back
    ToolBar1.Titel = Starter.Language.value("strGamePoint") & ": Online"

    TabPages.Initialize
    
    page1.Initialize("page1")
    page1.RootPanel.LoadLayout("frmStatistikLevel1")
    UpdateStatistikViews(1)
    SetAttributedTitle(page1, csb.Initialize.Color(0xFFFFFFFF).Font(Font.CreateNew(14)).Append(Starter.Language.value("strMit4Karten")).PopAll)
    TabPages.Add(page1)

    page2.Initialize("page2")
    page2.RootPanel.LoadLayout("frmStatistikLevel2")
    UpdateStatistikViews(2)
    SetAttributedTitle(page2, csb.Initialize.Color(0xFFFFFFFF).Font(Font.CreateNew(14)).Append(Starter.Language.value("strMit4KartenTime")).PopAll)
    TabPages.Add(page2)

    page3.Initialize("page3")
    page3.RootPanel.LoadLayout("frmStatistikLevel3")
    UpdateStatistikViews(3)
    SetAttributedTitle(page3, csb.Initialize.Color(0xFFFFFFFF).Font(Font.CreateNew(14)).Append(Starter.Language.value("strMit7Karten")).PopAll)
    TabPages.Add(page3)

    TabStrip1.SetPages(TabPages)

End Sub

Private Sub pOnlineStatistik_Resize (Width As Float, Height As Float)
    Dim r As Rect = Main.pOnlineStatistik.SafeAreaInsets
    pnlRoot.SetLayoutAnimated(0, 1, r.Left, r.Top, Width - r.Right - r.Left, Height - r.Bottom - r.Top)
End Sub

Private Sub pnlRoot_Resize (Width As Float, Height As Float)
...
End Sub


iphone 6+ screenshot:
1606334794447.png


iphone-X screenshot:
1606334840836.png
 
D

Deleted member 103

Guest
Thanks Erel!
I was looking for this solution all day yesterday, my search engine may not be as good as yours. :)

Can you please add this solution to your TabStrip tutorial? That might help others.
 
Upvote 0

Similar Threads

Top