Repository navigation
Closed
Labels
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformproject/layout 🧱Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
Description
Current behavior
When I removed the status bar by adding those 4 lines in the style.xml
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>Applying VisibleBoundsPadding.PaddingMask.Top on top of my xaml, it won't give enough space for the status bar and notch (if available)
*See workaround for expected result
Expected behavior
Expected result and Actual result should be mostly aligned vertically.
How to reproduce it (as minimally and precisely as possible)
Download StatusBarPaddingMask.zip
Deploy on Android
Workaround
To achieve similar result, I am able to retrieve the actual status bar height with StatusBar.GetForCurrentView().OccludedRect.Height. I am wondering if this should actually be used to calculate VisibleBoundsPadding.PaddingMask.Top
Environment
Nuget Package:
- Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
- Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
- Uno.SourceGenerationTasks
- Uno.UI.RemoteControl / Uno.WinUI.RemoteControl
- Other:
Nuget Package Version(s): 3.9.0-dev.6
Affected platform(s):
- iOS
- Android
- WebAssembly
- WebAssembly renderers for Xamarin.Forms
- macOS
- Skia
- WPF
- GTK (Linux)
- Tizen
- Windows
- Build tasks
- Solution Templates
IDE:
- Visual Studio 2017 (version: )
- Visual Studio 2019 (version: 16.8.4)
- Visual Studio for Mac (version: )
- Rider Windows (version: )
- Rider macOS (version: )
- Visual Studio Code (version: )
Relevant plugins:
- Resharper (version: )
Anything else we need to know?
Metadata
Metadata
Assignees
Labels
difficulty/starter 🚀Categorizes an issue for which the difficulty level is reachable by newcomerskind/bugSomething isn't workingplatform/android 🤖Categorizes an issue or PR as relevant to the Android platformproject/layout 🧱Categorizes an issue or PR as relevant to layouting and containers (Measure/Arrange, Collections,..)
Type
Projects
- StatusShow more project fieldsDone.


Activity
jeromelaban commentedon Jun 10, 2021
The computation is supposed to use the status bar size to set the
ApplicationView.VisibleBoundsproperty:uno/src/Uno.UI/UI/Xaml/Window.Android.cs
Lines 156 to 159 in d59985f
Could be the computation is done too early or not using the same content from occluded area.
Youssef1313 commentedon Aug 18, 2021
My best guess is that what stated in this comment isn't actually working:
uno/src/Uno.UI/UI/Xaml/Window.Android.cs
Lines 91 to 92 in 0c075f5
Nothing gets subtracted when
android:windowTranslucentStatusis false.@davidjohnoliver Since you worked on a similar issue in #4352, would you be able to help where/how to investigate?
davidjohnoliver commentedon Aug 20, 2021
@Youssef1313 This is the 'where', indeed. :)
The point of the comment, IIRC, is that the native metrics returned by Android are different depending if the status bar is opaque or translucent. Accordingly we don't to 'double dip' in certain parts of the math by subtracting it twice. But clearly if the VisibleBounds is not taking the translucent status bar into account then the logic is faulty somewhere.
rafaelrmoukc commentedon Jun 2, 2022
Start work on that issue, error still repro.
21 remaining items
Lee31416 commentedon Jan 29, 2025
I still get this issue on uno "5.6.20" which is the latest when I updated today. I have a sample but for some reason I can't paste it here, but Kevin's issue still holds true with the android translucent flag and his workaround also still works althought it's not ideal
jeromelaban commentedon Feb 4, 2025
@Lee31416 would you be able to try with
SafeAreainstead?Lee31416 commentedon Feb 5, 2025
@jeromelaban I already tried that and most other workaround we had done before like VisibleBoundsPaddingMask, SafeArea.insets, the safearea control and nothing seems to work
Lee31416 commentedon Feb 11, 2025
@jeromelaban which version of uno will contain the fix ?
jeromelaban commentedon Feb 11, 2025
@Lee31416 it should be an upcoming 5.6 service release, but there's an additional update coming in #19501
github-actions commentedon May 7, 2026
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests.