Android Question Navigation bar & Emulator

Semen Matusovskiy

Well-Known Member
Licensed User
Hi, guy --

I reconstruct an application, which was created in B4A 8.3, android.jar from platform 26.
Now I use B4A 8.5, android.jar from platform 28.

Just noticed that in emulator (SDK 26, 27) the navigation bar appears AFTER the layout is created in Activity_Resume.
Because in Activity_Resume app receives incorrect activity size, a part of the screen is closed by navigation bar.

This happens not every time, but enough often. In native smartphone (Oreo 8.1) all works correctly.

It looks that before building a layout, it's necessary to wait some events. But which ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Just noticed that in emulator (SDK 26, 27) the navigation bar appears AFTER the layout is created in Activity_Resume.
Because in Activity_Resume app receives incorrect activity size, a part of the screen is closed by navigation bar.
Please upload a small example that demonstrates this issue.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
The behaviour of real app is not stable. It's possible to run one time - all is correct, in next time (without any change in code or data) - troubles.
Probably, the problem is not in affected activity at all.

My app starts first activity in immersive mode and shows title picture. If user already entered login, the app starts another ("affected") activity.
Probably, the troubles are side effect of transition from immersive to standard regime.
I replaced my immersive code to your and results are better (unlike I need many tests to be sure).
Guess, Sleep (300) in your code helps. But why exactly 300 ms ? Theoretically android should inform somehow that transition is over.
 
Last edited:
Upvote 0
Top