iOS Question B4XPage Full Page

MarcoRome

Expert
Licensed User
Longtime User
Hi All.
What is the code in B4XPage to have the full screen page in b4i.
In the "classic" system i use the following code:

B4X:
Public Sub Show
....
'Full screen
    Main.NavControl.ToolBarVisible = False
    Main.NavControl.SetNavigationBarVisibleAnimated(False)
    Dim no As NativeObject = App
    no.RunMethod("setStatusBarHidden:animated:", Array(True, False))
    SetStatusBarStyleLight
End Sub

Sub SetStatusBarStyleLight
    Dim no As NativeObject = App
    no.RunMethod("setStatusBarStyle:", Array(1))
End Sub

In B4xPage to have all pages full screen ?
Thank you
Marco
 

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
Hello, are you referring to the extended screen style that I use here as you can see on the Google Map?
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
Hello, are you referring to the extended screen style that I use here as you can see on the Google Map?

Hi @Johan Hormaza
Yes. The ability to see all screens in full page.
 
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
This code for each page
B4X:
Private Sub B4XPage_Resize (Width As Int, Height As Int)
   #If B4i
    Dim r As Rect = B4XPages.GetNativeParent(Me).SafeAreaInsets
    Root.SetLayoutAnimated(0,r.Left, r.Top - 50, Width - r.Right - r.Left, (Height - r.Bottom - r.Top) + 85)
  #End if
End Sub
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
This code for each page
B4X:
Private Sub B4XPage_Resize (Width As Int, Height As Int)
   #If B4i
    Dim r As Rect = B4XPages.GetNativeParent(Me).SafeAreaInsets
    Root.SetLayoutAnimated(0,r.Left, r.Top - 50, Width - r.Right - r.Left, (Height - r.Bottom - r.Top) + 85)
  #End if
End Sub
Thank you for your support @Johan Hormaza

If I add SafeArea with the title everything is ok

WhatsApp Image 2023-03-19 at 08.43.25.jpeg


If I delete the title using the statement:

B4X:
NavControl.NavigationBarVisible = False

WhatsApp Image 2023-03-19 at 08.43.25 (1).jpeg


I do not understand...
in attachment example
 

Attachments

  • Project.zip
    180.7 KB · Views: 58
Last edited:
Upvote 0

Johan Hormaza

Well-Known Member
Licensed User
Longtime User
You must eliminate the Autoscall and the status bar in the design script.
you must add a panel of the same color as the menu. Tomorrow I'll send you an example of the adjustment I made to be able to use that menu
 
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
You must eliminate the Autoscall and the status bar in the design script.
you must add a panel of the same color as the menu. Tomorrow I'll send you an example of the adjustment I made to be able to use that menu

Hi @Johan Hormaza
I already tried to remove autoscale and status bar. It does not change.
The problem is the one reported by @Alexander Stolte here:

Using other "objects" there is no problem using the following code:

Main
B4X:
Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    
    'Per Nascondere il titolo sulle pagine
    'NavControl.NavigationBarVisible = False
    
    
    Dim PagesManager As B4XPagesManager
    PagesManager.Initialize(NavControl)
    
    'Full screen
    Nav.SetNavigationBarVisibleAnimated(False)
    Dim no As NativeObject = App
    no.RunMethod("setStatusBarHidden:animated:", Array(True, False))
    SetStatusBarStyleLight
    
    
End Sub

Sub SetStatusBarStyleLight
    Dim no As NativeObject = App
    no.RunMethod("setStatusBarStyle:", Array(1))
End Sub

in another modules

B4X:
Private Sub B4XPage_Resize (Width As Int, Height As Int)
    obejctuse.mBase.Top = Height - objectuse.mBase.Height - B4XPages.GetNativeParent(Me).SafeAreaInsets.Bottom
End Sub



Anyway Thank you for your support 👍
 
Upvote 0
Top