Android Question how adjust status bar and navigation bar when using color theme?

Douglas Farias

Expert
Licensed User
Longtime User
Hello everyone.

It's been a while since I've programmed apps, and I'm getting back to it now.

I'd like to understand more about Pages.

I need to use this, which sets the colors and solves the color issue when the app loads.


Using this, it actually solves the problem of the app loading with the correct color.

However, the rest of the layout is buggy. The layout loads behind the status bar, as if it were full screen, but the status bar and navbar are on the screen.

Even trying to change the top of the root doesn't solve the problem.

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.Top = 200dip
    Root.SetLayoutAnimated(0,0, 200dip,100%x, 100%y)
[QUOTE]
End Sub

Note: I can set any top size for the root, and it still doesn't work, it always stays at the top of the screen. It seems to be ignored when I use the colored layout.

How can I use the colorful theme, and still ensure that the layout (root) will obey the statusbar and navbar?

I attached an image using only
CreateResourceFromFile(Macro, Themes.LightTheme)

and you can see that the layout follows the size of the status bar and navbar; the layout loads within the correct space.

thank you in advance
 

Attachments

  • WhatsApp Image 2025-08-08 at 00.27.59.jpeg
    WhatsApp Image 2025-08-08 at 00.27.59.jpeg
    97.9 KB · Views: 44
  • WhatsApp Image 2025-08-08 at 00.31.18.jpeg
    WhatsApp Image 2025-08-08 at 00.31.18.jpeg
    93.4 KB · Views: 45

Erel

B4X founder
Staff member
Licensed User
Longtime User
However, the rest of the layout is buggy. The layout loads behind the status bar, as if it were full screen, but the status bar and navbar are on the screen.
 
Upvote 0
Top